How to configure threads with Tomcat 8 on ubuntu 20.04 LTS - TechBeginner

Welcome to TechBeginner.in, Tech Beginner provides technical blog for Online Linux Tutorials, Ubuntu Tutorials, Redhat Tutorials and CentOS 7, Configuration of server like Web Server, Application server, Database server, Window server, networking, html, css, java script, php, wordpress, opencart, magento, joomla and etc.

How to configure threads with Tomcat 8 on ubuntu 20.04 LTS

Share This


 

Every 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 server.xml config file and restart the Apache tomcat's service.
            




No comments:

Post a Comment