I am in the process of migrating a simple app using the Go 1.11 runtime from the AppEngine flex environment to the standard environment because flex got shockingly expensive for my low-traffic site (and standard wasn't available for this runtime until recently). Every time GAE hits the /_ah/start
endpoint for my app it logs a 301 and the following error: Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404.
My server does have a handler for /_ah/start
that simply writes a 200 and works fine locally. I also tried adding a handler for all routes in app.yaml
just to make sure requests to the AppEngine load balancer are actually being routed to my server, but it still isn't working. I know from the service logs that my server is starting and listening on the correct port but it gets restarted over and over and can't actually handle any requests because of this issue with the GAE start request.
Here's my app.yaml
:
runtime: go111
instance_class: B1
basic_scaling:
max_instances: 1
handlers:
- url: /.*
script: auto
/_ah/start
and it returns a 200. I am not sure how to mimic the setup of the actual AppEngine environment locally so that basically just validates that my server works as expected in a more general sense, not that it works in the context of AppEngine. I have no idea where the redirect is coming from when I deploy to GAE, but it's interesting that that first error log happens before my server logs anything, meaning it's trying to hit that endpoint before running main.go. – Kayla Fuchs