谷歌App Engine 500错误,但为什么?

时间:2010-09-20 18:21:59

标签: google-app-engine

部署后,我在App Engine中收到以下错误。有人知道原因吗?它有时会导致错误页面。似乎simplejson是原因...

根据http://code.google.com/status/appengine/,每个人都应该相应地工作。

  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.

这是页面显示的错误:

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.

这似乎不是导致500错误的唯一错误。因为大多数情况下这似乎是原因:

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.

2 个答案:

答案 0 :(得分:4)

这是你的问题:

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

您的页面太慢,应该在30秒内加载。否则,App Engine会将其终止。

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

答案 1 :(得分:1)

似乎真正的问题是文件中有一个“”作为一些注释,这会产生500错误。应用程序现在正在顺利运行。我很高兴我终于找到了它。

因此,如果您收到此错误,请先检查您是否以错误的方式发表评论!