Monday, July 19, 2021

[google-cloud-sql-discuss] Re: "too many connections for database" in Postgres.

Hello, 

Can you provide us with the full exact error message.

Thank you.

On Friday, July 16, 2021 at 9:25:27 AM UTC-4 ja...@theclub.tv wrote:
Hey all,

I've been having an issue where the postgres database in Cloud SQL won't allow connections from anything outside the `psql` command line client - there's always a "too many connections for database 'postgres'" error. I've tried multiple things - increasing machine CPU/memory, restarting, even deleting the database instance and setting up a new one (which solved the problem for a few hours, but after a while the problem came back...).

Querying `pg_stat_activity` tells me there's only 9 connections (see attached image), and only 1 of which is from us and not Google Cloud. Screenshot from 2021-07-16 09-58-45.png

The database instance is Postgres 13, db-g1-small with 1.7GB memory, 10GB HDD storage. Public IP is enabled and our IP addresses are definitely whitelisted. The zone is a single zone eu-west2 (London).

Another coworker said he can't even connect with the `psql` cli either, and DBeaver, PGAdmin, or our backend (in node using typeorm/pg modules) are all getting the same "too many connections for database" error.

--
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/0e30e295-f486-47fe-862a-b59f6ce17451n%40googlegroups.com.

No comments:

Post a Comment