53300 Too Many Connections
You may encounter an error message like following.
FATAL: sorry, too many clients already
You have reached the default limit of 100 database sessions. At most max_connections connections can ever be active simultaneously, you need to modify the parameter value in the configuration file postgresql.conf, and restart the database service to update the configuration parameter.
You may encounter an error message like following.
FATAL: too many connections for database "mydb"
You have reached the limit on the number of connections to a database. Run the following SQL statement to query the maximum number of connections for the database:
SELECT datconnlimit FROM pg_database WHERE datname = 'mydb';
You can issue ALTER DATABASE CONNECTION LIMIT to change the limit.
ALTER DATABASE mydb CONNECTION LIMIT 100;
You may encounter an error message like following.
FATAL: too many connections for role "david"
You have reached the limit on the number of connections for a database role. Run the following SQL statement to query the maximum number of connections for the role:
SELECT rolconnlimit FROM pg_roles WHERE rolname = 'david';
You can issue ALTER ROLE CONNECTION LIMIT to change the limit.
ALTER ROLE david CONNECTION LIMIT 100;