Search code examples
postgresqlgoogle-cloud-sql

Google Cloud SQL connection limit is not the same as in the documentation


I created a postgres instance yesterday, mirroring one we already had set-up. However it seems the default 'max_connections' is set to 25 rather than 100: https://cloud.google.com/sql/faq#sizeqps

While connecting to the database I get the following result:

      name       | setting 
-----------------+---------
 max_connections | 25

How can I set the number of max_connections to 100?


Solution

  • Uh-oh, docs are out of date. We gotta fix that, thanks for reporting!

    Cloud SQL's PostgreSQL connections scale with the instance size. You are probably using "micro" instance. Upgrading to "small" will give you 50 concurrent connections, first non-shared-core machine (1 CPU, 3.7G RAM) will give you 100, larger instance will give you more than a 100.