The quantity of instances deployed default is 2, the minimum of instances required is 1, as you can confirm in this link[1]. However, maybe only 1 instance it will not be enough for ~5 users. It seems that by setting 2 instances, could help you to solve this issue. You can retrieve more logs in your PHP instance by using the “Stackdriver Logging in App Engine apps”, such as errors surfaced from within the Nginx process, Nginx logs specifically for health checks. You can find more details in the following documentation[2]. [1]https://cloud.google.com/appengine/docs/flexible/python/reference/app-yaml#automatic_scaling [2]https://cloud.google.com/appengine/articles/logging
On Wednesday, October 17, 2018 at 8:22:17 AM UTC-4, Maxime Lebastard wrote: > > > Hi, > > We've got a Node Express app on a GAE standard instance. It calls a PHP > service on another GAE standard instance - through a server-to-server http > request. > > Most of the time it works well, but since our first production deployment > we had a few (32 times) 502 Bad Gateway errors every day on that request. > > By looking to the trace logs: > > - I can see the NodeJS errors (getting a 502 response, throwing an > exception etc...), > - I can see a first log at 22:59:52.974 http_load_balancer WARN log > because a 502 error has been returned. jsonPayload.statusDetail value is > "failed_to_connect_to_backend" > - I can see a second log at 22:59:52.979 http_load_balancer WARN log > because a 502 error has been returned. jsonPayload.statusDetail value is > "response_sent_by_backend" > > But I can't see any trace on the PHP service. I checked the health calls > of the same timeframe for the PHP service, all the healthchecks return a > 200 OK. > > My guess is a network error from Google Cloud - or maybe a latency matter, > but is there a way I can diagnose and fix that ? What can be the causes of > a load balancer returning a Bad Gateway whereas the GAE instance is up and > running ? > > Max > -- 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/1a6f54a6-4126-4204-8c77-0cc7dfdb5ca0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
