Startup check: HTTP MaxThreads configuration

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 HTTP thread pool (MaxThreads) is not greater than your database connection pool.  For example if MaxThreads is set to 48, your database connection pool should allow 60 connections. As a general rule you should allow either 10 additional database connections or 25% more database connections (whichever is the greater),  for debugging or administrative purposes. 

To resolve this issue

To resolve this issue you should either increase your database connection pool, or decrease your HTTP thread pool. The option you choose will depend on your environment (for example your database may not be be able to support an increased number of connections).

Change the size of the database connection pool

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. 

Change the size of the HTTP thread pool 

To change the HTTP thread pool (MaxThreads):

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

If you have multiple connectors configured, you will need to change the value of maxThreads in each one. If you've used Executor to configure a thread pool that is shared by multiple connectors, you will need to change the value of maxThreads in the thread pool, otherwise this check will continue to fail.

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. 

Known issues

There's a known issue where this warning is displayed incorrectly if you have configured Tomcat to use the Http11Nio2Protocol.  If you've checked that the size of your thread pool and database connection pool are adequate, you can ignore this warning.  See  CONFSERVER-58739 - Getting issue details... STATUS  for more information.

A similar issue as above may occur if you are running Confluence 7.12.2 or earlier and have more than one Tomcat connector configured in the server.xml file. Check CONFSERVER-58097 - Getting issue details... STATUS for additional details on this bug.

Last modified on Aug 5, 2022

Was this helpful?

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