org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
プラットフォームについて: Server と Data Center のみ - この記事は、サーバーおよびデータセンター プラットフォームのアトラシアン製品にのみ適用されます。
Bamboo records an error when trying to connect to a Postgres database:
Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: org.postgresql.util.PSQLException: FATAL: sorry, too many clients already
- Any Postgress database
- Any Bamboo newer than 5.0
Bamboo is requesting a higher number of connections from the database than it is able to provide. Postgress will also need to have a number of Administrative threads free.
To correctly configure your Bamboo connection pool when talking to Postgres (or any other database) the number of connections requested by Bamboo MUST be less than the number of connections offered by the database.
Locate your $BAMBOO_HOME/bamboo.cfg.xml file and look for the line
By default this will be set to 100. This is a good default value to have. Don't change it unless you have talked to Atlassian Support first.
Run the SQL command
If it's less than what you have Bamboo requesting above you will need to increase it.
To do so:
- Locate your postgresql.conf file (You can run "SHOW config_file" in Postgres to locate it).
- Increase the max_connections value to more than the number that Bamboo is requesting.
This value should be HIGHER than the value set in bamboo.cfg.xml above.