4👍
✅
Found the answer here.
Stating from GAE 1.9.5, the number of concurrent db request per instance is limited to 12. The solution was to limit the number of concurrent requests per instance to 12, by changing app.yaml
:
automatic_scaling:
max_concurrent_requests: 12
For those who don’t use GAE Modules or Automatic Scaling, the solution may be to disable concurrent requests completely by setting threadsafe: false
. Note that this might dramatically increase the number of instances.
Another solution is to use some kind of a DB connection pool with a limited number of simultaneous connections. I haven’t tried it myself.
Source:stackexchange.com