Startup check: Database connection pool size

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

This check confirms that the size of your database connection pool is adequate for Confluence. 

To resolve this issue

To resolve this issue you should increase your database connection pool. You will need to make sure your database can support the number of connections. 

Change the size of the database connection pool

(info) To understand if you are using JDBC connection(usually the most common) or datasource connection, you may want to review Check your database connection once and confirm before proceeding. 

If you're using a JDBC connection (this is the most common configuration) you will need to:

  1. Stop Confluence (if Confluence is running).
  2. Edit <home-directory>/confluence.cfg.xml and change the value of hibernate.c3p0.max_size and hibernate.hikari.maximumPoolSize  (if present). 
  3. Restart Confluence. 

If you're using a datasource connection, you'll make this change in your datasource:

  1. Stop Confluence (if Confluence is running).
  2. Edit <install-directory>/conf/server.xml  and change the value of MaxTotal
  3. Restart Confluence.

To find out more about configuring your database connection pool in a datasource see the JNDI Datasource HOW-TO in the Apache documentation. 

It may also be necessary to increase the number of connections allowed by your database. This is usually only required for PostgreSQL and MySQL. SQL Server and Oracle usually have sufficiently high limits.


Show me how to do this...

MySQL

MySQL has a default of 151 maximum connections. You can check the maximum configured with:

MySQL
mysql -u confluence -h localhost -p -e "SHOW VARIABLES LIKE '%max_connections%';"

See the MySQL documentation on how to increase the limit: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_connections

PostgreSQL

PostgreSQL has a maximum of 100 connections. You can check the maximum configured with:

PostgreSQL
psql -U postgres -c 'show max_connections;'

See the PostgreSQL documentation on how to increase the limit: https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html


What will happen if I dismiss this warning? 

Confluence may slow down or time out during periods of heavy load because the number of connections configured for the database connection pool is too small to handle the number of requests.  See Confluence slows and times out during periods of high load due to database connection pool for more information. 


Last modified on Apr 12, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.