As per App Engine officials docs, App engine sends periodic health check requests to confirm that an instance is running, and to check that an instance is fully started and ready to accept incoming requests. By default, these health checks are enabled and are known as split health checks. An instance that receives a health check must answer the health check within a specified time interval.
As the instance goes through these health checks , if the instance is healthy it works fine but if the instance is unhealthy then it restarts.
Official docs says :
Unhealthy. The instance refused the health check requests and failed
to respond to a specified number of consecutive health check requests.
App Engine continues to send health check requests and restarts the
instance if an unhealthy instance continues to fail to respond to a
predetermined number of consecutive health checks.
Requesting you to try by setting min and max instances in automatic scaling or else use basic scaling as per this doc.