Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you found that your server does not respond anything without any error message, it might be associated with the maximum number of thread in your system.


I resolved this issue by following actions.


1) Modifying adding below lines to /etc/security/limits.conf in my CentOS 7 server.

Code Block
* hard nofile 500000
* soft nofile 500000
root hard nofile 500000
root soft nofile 500000


2) Modifying a value of maxThreads.Connector in <confluence_home_directory>/conf/server.xml


You may able to see maxThread as a member of <Connector>. The default value of maxThreads is 48 - I just modified it to 4096

Code Block
<Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">

        <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                   maxThreads="48" minSpareThreads="10"
                   enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                   protocol="org.apache.coyote.http11.Http11NioProtocol"/>

        <Engine name="Standalone" defaultHost="localhost" debug="0">
            <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
                <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                    <!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                    <Manager pathname=""/>
          confluence      soft   nofile  4096
confluence      hard   nofile  8192
confluence1  <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>
                </Context>

    soft   nproc   4096      <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" 
confluence1debug="0"
                   hard   nproc   8192 
confluence3reloadable="false" useHttpOnly="true">
                    soft<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>
     nproc   4096        
confluence3 </Context>
            </Host>
     hard   nproc</Engine>

   8192  </Service>
</Server>

Once your modification is done, you should restart your server to take effect.