I am new to tomcat and want to know the default value for maxConnection for tomcat on windows 7 .
Have checked http://tomcat.apache.org/tomcat-7.0-doc/config/http.html which says
maxConnections : 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.
I am not sure if <Connector port="8090" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
comes under BIO or NIO or APR/native
Any help would be appreciated.
Thanks
By default, Tomcat sets maxThreads to 200, which represents the maximum number of threads allowed to run at any given time. You can also specify values for the following parameters: minSpareThreads : the minimum number of threads that should be running at all times.
The default installation of Tomcat sets the maximum number of HTTP servicing threads at 200. Effectively, this means that the system can handle a maximum of 200 simultaneous HTTP requests.
Connector elements are Tomcat's links to the outside world, allowing Catalina to receive requests, pass them to the correct web application, and send back the results through the Connector as dynamically generated content.
maxHttpHeaderSize. The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 8192 (8 KB). maxKeepAliveRequests. The maximum number of HTTP requests which can be pipelined until the connection is closed by the server.
This is what I gathered from Tomcat's documentation:
If you don't specify it explicitly through the protocol
attribute of the Connector
element (as in your example above), tomcat will search native libraries (through the LD_LIBRARY_PATH on Unixes or Path environment variables on Windows) for APR connector and if the connector is not found it will use BIO (Blocking IO) connector (see description of the protocol attribute Tomcat HTTP Connector).
For a BIO connector, if not specified maxConnections
will assume the value of maxThreads
attribute. Default value in turn for maxThreads
is 200 unless you use the 'executor' attribute pointing to an Executor element in which case it will be the value of maxThreads of the executor element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With