Monday, April 11, 2022

[google-cloud-sql-discuss] Re: Max connections on PGSQL

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.

On Saturday, April 9, 2022 at 10:27:26 AM UTC-5 Rafael Falcão wrote:
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

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/8b36d207-8414-45d0-9f18-8ab93a4fc840n%40googlegroups.com.

No comments:

Post a Comment