How many concurrent request can tomcat handle by Default [closed]

How many requests Tomcat7.0.42 handle at a time.Can we configure the same in any external File.If so where.


It depends on the type connector you are using to accept the requests. There is parameter called maxConnections in server.xml that can be configured to throttle the number of incoming requests. Here is the description of maxConnections params for Tomcat 7:

The maximum number of connections that the server will accept and process at any given time. When this number has been reached, the server will not accept any more connections until the number of connections falls below this value. The operating system may still accept connections based on the acceptCount setting. Default value varies by connector type. For BIO the default is the value of maxThreads unless an Executor is used in which case the default will be the value of maxThreads from the executor. For NIO the default is 10000. For APR/native, the default is 8192.

Note that for APR/native on Windows, the configured value will be reduced to the highest multiple of 1024 that is less than or equal to maxConnections. This is done for performance reasons. If set to a value of -1, the maxConnections feature is disabled and connections are not counted


In server.xml file you specify maxThreads which specifies maximum number of simultaneous requests that can be handled..

<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="4443" acceptCount="100"
               debug="0" connectionTimeout="60000" 
               disableUploadTimeout="true" />

In Tomcat 7,

The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 200.

EDIT : If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool.

For more info, refer this link Tomcat 7 Doc