Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine 500 Error, but why?

I am getting the following error in App Engine after I deployed it. Does anybody know the reason? It's causing an error page sometimes. It seems simplejson is the cause...

According to http://code.google.com/status/appengine/ everyting should be working accordingly.

  09-20 11:03AM 56.027 / 500 55902ms 240cpu_ms 0kb Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; nl-nl) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5,gzip(gfe)
 - - [20/Sep/2010:11:04:51 -0700] "GET / HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; nl-nl) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5,gzip(gfe)" "" ms=55903 cpu_ms=240 api_cpu_ms=0 cpm_usd=0.006723 loading_request=1 pending_ms=1266
E 09-20 11:04AM 51.915
<class 'google.appengine.runtime.DeadlineExceededError'>: 
Traceback (most recent call last):
  File "/base/data/home/apps//7.344918194765199957/main.py", line 11, in <module>
    from logic import home, program, image, searchhandler, twitter, sitemap, feed
  File "/base/data/home/apps/7.344918194765199957/logic/home.py", line 14, in <module>
    from django.utils import simplejson
  File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/__init__.py", line 95, in <module>
    from django.utils.simplejson.decoder import JSONDecoder
  File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/decoder.py", line 6, in <module>
    from django.utils.simplejson.scanner import Scanner, pattern
  File "/base/python_runtime/python_lib/versions/third_party/django-0.96/django/utils/simplejson/scanner.py", line 3, in <module>
    """
I 09-20 11:04AM 51.924
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

This is the error that the page will show:

Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

It seems this is not the only error causing the 500 error. Because most of the time this seems to be the cause:

09-20 11:37AM 18.229 /ohohcherso.html 500 11007ms 0cpu_ms 0kb Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3,gzip(gfe),gzip(gfe)
94.209.194.233 - sammiestoel [20/Sep/2010:11:37:29 -0700] "GET /ohohcherso.html HTTP/1.1" 500 0 "http://www.tweetstream.nl/index.html" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.62 Safari/534.3,gzip(gfe),gzip(gfe)" "www.tweetstream.nl" ms=11008 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000148
W 09-20 11:37AM 29.237
Request was aborted after waiting too long to attempt to service your request. This may happen sporadically when the App Engine serving cluster is under unexpectedly high or uneven load. If you see this message frequently, please contact the App Engine team.
like image 964
Sam Stoelinga Avatar asked Sep 20 '10 18:09

Sam Stoelinga


1 Answers

Here's your problem:

<class 'google.appengine.runtime.DeadlineExceededError'>

Your page is too slow, it should load within 30 seconds. Otherwise the App Engine will kill it.

http://code.google.com/appengine/docs/python/runtime.html#The_Request_Timer

like image 113
Wolph Avatar answered Sep 21 '22 16:09

Wolph