2010-09-20 23 views
5

Ho riscontrato il seguente errore in App Engine dopo che l'ho distribuito. Qualcuno conosce la ragione? A volte sta causando una pagina di errore. Sembra semplicejson è la causa ...Errore Google App Engine 500, ma perché?

Secondo http://code.google.com/status/appengine/ tutto dovrebbe funzionare di conseguenza.

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. 

Questo è l'errore che la pagina mostrerà:

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. 

Sembra che questo non è l'unico errore che causa l'errore 500. Poiché la maggior parte delle volte questo sembra essere la causa:

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. 
+0

il vero errore sembra mancare. Non ci dovrebbero essere 2 righe dopo il 'file "/ base/python_runtime/python_lib/versioni/third_party/django-0.96/django/utils/simplejson/scanner.py ", riga 3, in ' con l'errore reale oppure una riga appena sopra il 'Traceback' – Wolph

+0

Modificato la domanda con il codice di errore completo. Scusa .. –

risposta

4

Qui è il problema:

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

La pagina è troppo lento, si deve caricare entro 30 secondi. In caso contrario, l'App Engine lo ucciderà.

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

+0

AH, grazie per questo link, non lo sapevo. Ma potresti anche controllare il mio ultimo errore? Questo errore viene causato tutto il tempo ora .. –

+0

@ Sam S: questo è un errore abbastanza comune dopo aver pubblicato la tua app dalla mia esperienza. Potrebbero volerci un paio di minuti prima che l'app sia completamente in esecuzione, quindi la prima volta devi solo aspettare un po '. – Wolph

+0

Ok, guarderò anche alle ottimizzazioni. Dovrei essere in grado di correggere DeadlineExceededError con optimlization giusto? Grazie per la tua risposta, la contrassegnerà come accettata se non arrivano risposte migliori;) –

1

Sembra che il vero problema è che c'era un """ nel file come alcuni commenti, che ha creato l'errore 500. L'applicazione funziona liscio ora. Sono felice di aver trovato finalmente .

Quindi, se si ottiene questo errore prima verificare se hai fatto commenti in un brutto modo!