App Engine HTTP 500s
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 appl开发者_如何学JAVAication.
I've handled all the situations, also DeadlineExceededError too. But sometimes I see these error messages in error logs. That request took about 10k ms, so it's not exceeded the limit too. But there is no other specific message about this error. All I know is that it returned HTTP 500. Is there anyone know the reason of these error messages?
Thank you.
I'm fairly sure that the specific message is not related to the HTTP 500 you are getting. All this means that the instance of your app was initialized.
Here's an example of this message for my app with a successful response:
06-13 09:58AM 04.933 /favicon.ico 404 344ms 310cpu_ms 0kb Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4,gzip(gfe)
199.107.215.203 - - [13/Jun/2010:09:58:05 -0700] "GET /favicon.ico HTTP/1.1" 404 124 - "Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4,gzip(gfe)" "XXXXXXXX.appspot.com"
I 06-13 09:58AM 05.276
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
I agree that the correlation between startup log messages and 500 errors is not necessarily causal. However, it could be and pocoa should take steps to ensure that his startup time is low and that time consuming tasks be deferred when possible.
One log entry and one 500 error does not mean much, but a few with time correlated probably points to excessive startup costs.
I posted to my blog some workarounds for this issue
Optimize imports
Use Always On premium feature
Use cron job to keep your instance alvie
http://blog.mfabrik.com/2011/03/11/google-app-engine-issues-with-dynamic-instances-and-deadlineexceedederrors/
It also contains instructions how
精彩评论