Confluence Crashes After Exceeding Maximum Number of Threads
症状
Confluence display the following error in the application server logs and crashes:
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
原因
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.
ソリューション
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:
<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:
<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.
Confluence を再起動します。