Confluence Crashes After Exceeding Maximum Number of Threads
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Symptoms
Confluence display the following error in the application server logs and crashes:
1
2
3
4
5
6
Jun 12, 2012 12:38:04 PM org.apache.tomcat.util.net.JIoEndpoint createWorkerThread
INFO: Maximum number of threads (200) created for connector with address null and port 8090
Jun 12, 2012 12:41:31 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8090
Jun 12, 2012 12:41:32 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Cause
Confluence is crashing due to a high number of threads created. When it tries to create a new one, the application stops responding and starts to shutdown the application server.
Resolution
Increasing the maxThreads
parameter will resolve the issue. Do this incrementally; raising the value of maxThreads too much can result in performance problems such as:
High memory usage
General slowness due to the JVM being forced to context switch between many threads frequently
To increase maxThreads:
Open the server.xml located at <CONFLUENCE-INSTALL>/conf and find the connector:
1 2 3 4 5 6 7 8
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="6543" minProcessors="5" maxProcessors="75" enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false" URIEncoding="UTF-8"/>
Modify the maxThreads property or add it if it is not defined in the connector:
1 2 3 4
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="6543" maxThreads="250" minSpareThreads="10" enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000" useURIValidationHack="false" URIEncoding="UTF-8"/>
ℹ️Remember that if you have HTTPS/SSL enabled, you need to modify both connectors.
Restart Confluence
Was this helpful?