I am using Google App Engine Standard Environment for my NodeJs App. Things were working fine until I register a route '/*' in my express app to catch all routes after my initial routes like '/', '/login' etc. . After deploying my app on GAE I got :
Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.
In my App Engine build logs :
My app.yaml looks like:
app.yaml
runtime: nodejs10
env: standard
service: default
health_check:
enable_health_check: False
manual_scaling:
instances: 1
resources:
cpu: 1
memory_gb: 0.5
disk_size_gb: 10
Quoting from official Docs of GAE: https://cloud.google.com/appengine/docs/standard/nodejs/how-instances-are-managed
Startup Each service instance is created in response to a start request, which is an empty HTTP GET request to /_ah/start. App Engine sends this request to bring an instance into existence; users cannot send a request to /_ah/start. Manual and basic scaling instances must respond to the start request before they can handle another request. The start request can be used for two purposes:
To start a program that runs indefinitely, without accepting further requests. To initialize an instance before it receives additional traffic. Manual, basic, and automatically scaling instances startup differently. When you start a manual scaling instance, App Engine immediately sends a /_ah/start request to each instance. When you start an instance of a basic scaling service, App Engine allows it to accept traffic, but the /_ah/start request is not sent to an instance until it receives its first user request. Multiple basic scaling instances are only started as necessary, in order to handle increased traffic. Automatically scaling instances do not receive any /_ah/start request.
When an instance responds to the /_ah/start request with an HTTP status code of 200–299 or 404, it is considered to have successfully started and can handle additional requests. Otherwise, App Engine terminates the instance. Manual scaling instances are restarted immediately, while basic scaling instances are restarted only when needed for serving traffic.
Am I missing something? Please help.
Thanks in Advance