Is there any way to set timeouts in tomcat?

Can I set timeouts for JSP pages in tomcat at the page or server level?

+4
source share
2 answers

For the server level, you can try this.
you must modify the file catalina.bat/catalina.sh

jvm OPTIONS : -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000 
+2
source

In the Tomcat server.xml file, the Connector element also has an attribute connectionTimeoutin milliseconds.

Example:

<Connector
    URIEncoding="UTF-8"
    acceptCount="100"
    connectionTimeout="20000"
    disableUploadTimeout="true"
    enableLookups="false"
    maxHttpHeaderSize="8192"
    maxSpareThreads="75"
    maxThreads="150"
    minSpareThreads="25"
    port="7777"
    redirectPort="8443" />
+6
source

Source: https://habr.com/ru/post/1698281/


All Articles