Jump to content
  • How to Increase the maximum thread count at the Tomcat level

    • Features: JasperReports Server Audience: Administrator Skill: Expert

    In multi-user, high-concurrency environments it pays to tune Tomcat to use more threads to process HTTP requests. If the thread count isn't high enough, you may see HTTP requests going from the browser to the server that aren't being fulfilled; with a tool such as WireShark, you may notice that HTTP requests are going to the server but responses may not be coming back, depending on the load.

    If the server doesn't have enough threads, the server will wait until a thread becomes available before processing a request. In extreme cases, those requests that get queued may never get processed, if the wait time exceeds a server timeout value.

    To increase the maximum thread count, you can set it in the object in the Tomcat  <js-install>/apache-tomcat/conf/server.xml  file. By default, if the maximum threads value is not set, Tomcat uses a default value of 200 maximum threads. Here is an example:

    <connector connectiontimeout="20000"           maxthreads="400"           port="8080"           protocol="HTTP/1.1"           redirectport="8443" />[/code]
    • minSpareThreads
    • maxSpareThreads
    • acceptCount
    • maxKeepAliveRequests

    Documentation on these settings can be found here, among other places: https://tomcat.apache.org/tomcat-9.0-doc/config/http.html

    User Feedback

    Recommended Comments

    There are no comments to display.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...