2

Is there any way to properly troubleshoot GAE 500 server errors? I know I can check from console.developers.google.com -> Monitoring -> logs, but they do not tell much. Only same thing that I can get from the browser network response 500 internal server error.

What I am looking for is the similar log to apache.log or php.log that would actually print a stacktrace of an error or an exception that happened in app.

  • These answers are out of date now.. (some three years later). Look for the Error Reporting panel in the google cloud platform dashboard. – demented hedgehog Feb 9 '18 at 9:43
8

The previous answers are out of date now (some three years later). Look for the Error Reporting panel in the google cloud platform dashboard.

You will get a stack trace to the problem in your code (if the problem is in your code and I suppose you probably need to be logging errors to std err). A stack trace should help you debug a 500 error. Here's a stack trace that I just received ...

ImportError: No module named flask_assistant

at <module> (/base/data/home/apps/f~XXXX/20180209t180735.407529010683953771/main.py:31)
at LoadObject (/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:85)
at _LoadHandler (/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:299)
at Handle (/base/alloc/tmpfs/dynamic_runtimes/python27/a7637d5531ec9deb_unzipped/python27_lib/versions/1/google/appengine/runtime/wsgi.py:240)

That's how to get a stack trace in the event of a 500 error.

| improve this answer | |
  • Yes. I read this answer but never followed it for some reason. Go in App engine dashboard and look for client errors, server errors. It will tell you. In my case I was referencing js and css files (that did not exist) in my html file. works fine on localhost, but errors on GAE – Aseem Sep 15 '19 at 17:55
4

There's unfortunately no straightforward answer to this.

Normally, a 500 is something about which you cannot do much, as it's an error internal to the Google servers. The most we suggest is to have an exponential backoff to your requests, so that our infrastructure can "correct" the issue itself (which it usually does, and does pretty quickly).

Sometimes, some errors will throw 500 for specific behaviors (like sending a wrong format of file or a wrong variable type to a specific product). In these case, the error should be clearer. If it isn't, try to gather as much info as possible and then post it on our Issue Tracker that this error could be phrased with more info than "500"

| improve this answer | |
  • Thanks for you answer Patrice, even though its not the one I was hoping to get. Appreciate also the tips. – Maksim Luzik Oct 7 '15 at 6:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.