javaeclipsetomcat

Meaning of connectionTimeout in tomcat


What does that parameter mean for tomcat. It was declared in server.xml as follows:

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

So, I tried to change it...

<Connector connectionTimeout="2" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

...and didn't notice any effect. I expected that each page the load takes for more than 2 milliseconds would produce 504 - connection timeout error. But it didn't. I'm using eclipse and modify that file through it.


Solution

  • Taken from here: https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

    connectionTimeout

    The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. Use a value of -1 to indicate no (i.e. infinite) timeout. The default value is 60000 (i.e. 60 seconds) but note that the standard server.xml that ships with Tomcat sets this to 20000 (i.e. 20 seconds). Unless disableUploadTimeout is set to false, this timeout will also be used when reading the request body (if any).