Configure tomcat threads on ubuntu linux

Tomcat connector deals with its responsibility with a pool of laborer strings and at least one acceptor strings. At the point when a connector gets a solicitation from a customer, the acceptor string allocates the association with an accessible specialist string from the pool and afterward returns to tuning in for new associations. The specialist string then, at that point sends the solicitation to the motor, which measures the solicitation and makes the proper reaction dependent on the solicitation headers and the related virtual host and settings. A laborer string opens up again once the motor returns a reaction for the connector to communicate back to the customer.

In this post, We will configure Tomcat’s threads on ubuntu 20.04 LTS

Step 1: Threads Configure Tomcat

We need to open the Apache tomcat’s server.xml config file by using the given command.

sudo vim <Tomcat_Installation_Directory>/config/server.xml

Step 2: Adding Threads with Connection

To configure threads with port 8443, Use the following configuration.

   <Connector port="8443" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 minSpareThreads="10"
                 maxSpareThreads="100"
                 maxthreads="400"
                 acceptCount="100"
                 maxKeepAliveRequests=""
                 redirectPort="8443"
                 SSLEnabled="true"
                 scheme="https"
                 secure="true"
                 sslProtocol="TLS"
                 keystoreFile="/etc/pki/keystore"
                 keystorePass="_password_" />

To configure threads with port 8080, Use the following configuration.

   <Connector port="8080" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 minSpareThreads="10"
                 maxSpareThreads="100"
                 maxthreads="400"
                 acceptCount="100"
                 maxKeepAliveRequests=""    
                 redirectPort="8443" />

Save and exit fro the text editor.

Step 3: Restart Tomcat

To get new chnages with apache tomcat We need to restart the tomcat’s service once, Use the follwing command ofr the same.

sudo systemctl restart tomcat.service

Conclusion

We have successfully configure threads in apache tomcat 8 on ubuntu server, Kindly report in case you are facing defeculties with follwing details.

  • OS name
  • OS version
  • Package name
  • Logs – Error / Warning / failed

Get in touch with our new devops tools based website- https://www.devopstricks.in/

Configure tomcat threads on ubuntu linux

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top