Skip to content Skip to sidebar Skip to footer

Cloud Sql Socket Open Failed With Error: No Such File Or Directory

I have a Django app on App Engine that connects to a Cloud Sql server. Recently, some of the requests started to raise the following error from MySQLdb: OperationalError: (2062, 'C

Solution 1:

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.

Post a Comment for "Cloud Sql Socket Open Failed With Error: No Such File Or Directory"