Application Instance Instances

App Engine Spikes

I am using auto scaling with GAE by running php55. This also happened with php5. Options:

automatic_scaling: min_idle_instances: 0 max_idle_instances: 2 # default value min_pending_latency: 500ms max_pending_latency: 7000ms 

I am having trouble understanding why these spikes happen. Typically, my application requires no more than 5 instances. From time to time, this will stepwise affect 1200+ for no apparent reason. The logs surrounding this time show 500 timeout errors for all non-static content.

The only dependency on these pages is a simple database insert. I am using Google Cloud SQL. No errors were found in Cloud SQL logs.

Any ideas for further troubleshooting? As you can see from the image, this problem is very sporadic, but extremely expensive.

+7
google-app-engine php google-cloud-sql
source share
1 answer

This was because the database closed after a short period of inactivity. When the traffic returns, a restart of the database server is required. During this time, the application engine considered it necessary to create more instances in order to keep up with the heavy workload.

I solved this by leaving my database instance โ€œalways onโ€.

+1
source share

All Articles