Limits on time.sleep()?

8 views
Skip to first unread message

jonvee

unread,
Jul 29, 2008, 12:45:10 AM7/29/08
to Google App Engine
My app receives a request and then after a specified time, checks the
http status of the remote webserver. Kinda of a monitoring app for
remote servers.

Have it working on dev_appserver, but am concerned that it violates
some rule when uploaded to Google.

Thoughts?

Calvin Spealman

unread,
Jul 29, 2008, 5:42:15 PM7/29/08
to google-a...@googlegroups.com
try it.

--
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://ironfroggy-code.blogspot.com/

jonvee

unread,
Jul 29, 2008, 11:34:18 PM7/29/08
to Google App Engine
Sure enough it fails:

Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 499, in __call__
handler.get(*groups)
File "/base/data/home/apps/echocheck/1.1/echocheck.py", line 34, in
get
time.sleep(60)
DeadlineExceededError

Appears to validate the impression I got from other posts that GAE is
designed to deliver content in a couple of seconds. Otherwise too bad,
so sad!!

On to Plan B

oliverw

unread,
Jul 30, 2008, 4:17:27 AM7/30/08
to Google App Engine
All requests have to complete within a 5 second window. Check the
docs.

WallyDD

unread,
Jul 30, 2008, 6:54:20 AM7/30/08
to Google App Engine
I did some unit testing on this one a few weeks back and it was ten
seconds.

William Vambenepe

unread,
Jul 30, 2008, 12:40:24 PM7/30/08
to Google App Engine
10 seconds corresponds to what I have found (actually more like 9
seconds in average). Steve Jones has a <a href="http://service-
architecture.blogspot.com/2008/06/google-app-engine-performance-
part-3.html">pretty detailed analysis</a> of this.

You can cheat a bit to extend this by <a href="http://
stage.vambenepe.com/archives/213">chaining requests</a>. But that's
only a partial workaround when some of your requests need a bit more
time, it's not a way to implement a long-running process.

William
Reply all
Reply to author
Forward
0 new messages