Max connections on PGSQL

534 views
Skip to first unread message

Rafael Falcão

unread,
Apr 9, 2022, 11:27:26 AM4/9/22
to Google Cloud SQL discuss
Hello. I am using a f1-micro database with Strapi as CMS. But Strapi cannot connect to the database since there are no connections available.
SQL say it has 2 active connections and i cant establish more. Changing the tier to g1-small solves this issue but why is this happening? Why cant i establish more than 2 (that belong to CloudSQL) connections to the database if its a f1-micro? Is this a bug?
Thank you.cms after f1-micro.png

lopezacuna

unread,
Apr 11, 2022, 3:32:40 PM4/11/22
to Google Cloud SQL discuss

According to the Operational errors table if you get the message Remaining connection slots are reserved, the maximum allowed connections have been reached. You can increase the value of the max_connections flag. See Configuring database flags.

Database connections consume resources on the server and the connecting application. Always use good connection management practices to minimize your application's footprint and reduce the likelihood of exceeding Cloud SQL connection limits. For more information, see Managing database connections.

To see the processes that are running on your database, use the pg_stat_activity table:

select * from pg_stat_activity;

You can also try Tools for debugging connectivity

The db-f1-micro and db-g1-small machine types aren't included in the Cloud SQL SLA. These machine types are configured to use a shared-core CPU, and are designed to provide low-cost test and development instances only. Don't use them for production instances.

Reply all
Reply to author
Forward
0 new messages