Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Requests are failing because of max_instances setting over a last few days.

Hello fellow members,

Over the last few days, some of the requests on multiple services started failing which appears random behavior.  Also, when investigated, they all seem to have similar reason as "Process terminated because of the max instances setting." But in all cases, there was room to scale up.

For example in one such scenario:
Error reported: The request was aborted because there was no available instance. Try increasing the max_instances value in your app.yaml. More information at: https://cloud.google.com/appengine/docs/standard/reference/app-yaml#automatic_scaling_max_instances

No parallel requests on the version of the service.

Autoscaling config:
min_instances: 0
min_idle_instances:0
max_instances: 1

Instance class: F1 (384 MB)
Last memory peak (30 mins before the actual request on the error) - 203 MB (approx.)

Anyone else facing the same issue? Can anyone have any solution or detail that I am missing?

1 3 629
3 REPLIES 3

Our set-up is different (outlined below), however I've also been encountering this issue over the last few days, with requests failing with messages like:
Process terminated because of the max instances setting.
The request was aborted because there was no available instance. Try increasing the max_instances value in your app.yaml. More information at: https://cloud.google.com/appengine/docs/standard/reference/app-yaml#automatic_scaling_max_instances
Our automatic scaling config looks like:
automatic_scaling:
min_instances: 1
max_instances: 25
However, looking at our instances for that service, we never go above 10, so the default max of 20, and our configured max of 25, should be far more than necessary. I noticed that in the documentation there was this note:
Note: Starting from March 2025, App Engine sets the maximum instances default for standard environment deployments to 20. This change doesn't impact existing apps. To override the default, specify a new value between 0 and 2147483647, and deploy a new version or redeploy over an existing version. To disable the maximum instances default configuration setting, specify the maximum permitted value 2147483647.

I wonder if the change rolled out March 2025 isn't behaving as expected?

Looks like it! Please let me know if you encounter any working solution. 

Hi Yashh and etchao,

The new default for Max Instances would be only impacting new apps created this month. The error about "no available instance" could happen due to multiple reasons like a sudden increase in traffic, long request processing times or transient issues with the App Engine service. If this issue persists despite addressing the known causes, then it is best to raise a support ticket to investigate the cause.