*502 *bad gateway usually means that the Nginx proxy responsible for 
handling requests for App Engine instance has not been able to get in 
contact with your application, the application raises an exception, an 
internal API call raises an exception or if the request simply takes too 
long.  As such, *502* does not tell you much about the real source of the 
problem. 

You can check if there is a pattern for the error (e.g. is it happening on 
the same endpoint). You can also try to perform exponential backoff 
<https://cloud.google.com/storage/docs/exponential-backoff> in which retry 
a failed request only after waiting for a small delay to make sure the 
application does not get overloaded with requests. You might also be 
interested with 'error_handlers 
<https://cloud.google.com/appengine/docs/standard/python/config/appref#error_handlers>'
 element 
on your config file to possibly catch *502* errors related to over_quota or 
timeout, etc.


-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/f5bc0bef-98dd-4ca3-9003-17e4394ae0c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [google-appengine... Andrew Benton
    • [google-appe... 'Kenworth (Google Cloud Platform)' via Google App Engine

Reply via email to