Tomcat Configuration: Difference between revisions
No edit summary |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
* [[Tomcat#Subjects|Tomcat]] | * [[Tomcat#Subjects|Tomcat]] | ||
<font | <font color=red> | ||
=TODO= | =TODO= | ||
Line 11: | Line 11: | ||
=Subjects= | =Subjects= | ||
=Connector Configuration= | |||
<pre> | |||
<!-- A AJP 1.3 Connector on port 8009 --> | |||
<Connector port="8009" address="${jboss.bind.address}" | |||
enableLookups="false" redirectPort="8443" debug="0" | |||
protocol="AJP/1.3"/> | |||
</pre> | |||
For more details on Connectors, see {{Internal|Tomcat_Concepts#Connector|Tomcat Concepts - Connector}} | |||
==maxThreads== | |||
Make sure the value configured for <tt>maxThreads</tt> at least matches the value of mod_jk2 <tt>max_connections</tt>, configured in <tt>workers2.properties</tt> file. | |||
==keepAliveTimeout== | |||
Represents the number of milliseconds the connector (AjpProcessor instance, for example) will wait for a subsequent request before closing the connection. If not set in the configuration, Tomcat won't attempt to set it on the socket, which means the AjpProcessor instance will read from socket indefinitely. | |||
Internally, it is implemented invoking java.net.Socket#setSoTimeout() on the associated socket. According to the Socket class documentation, the call enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid. The option ''must be enabled prior to entering the blocking operation to have effect''. The timeout must be higher than 0. A timeout of zero is interpreted as an infinite timeout. | |||
When the timeout occurs: | |||
* The AjpProcessor instance is added to the recycled processor queue maintained by the AjpConnectionHandler instance | |||
* The underlying socket is closed | |||
* The Worker instance is stored as "idle" | |||
* curThreadsBusy is decremented | |||
==soTimeout== | |||
Has the same effect as setting 'keepAliveTimeout' above. | |||
Also see {{Internal|Socket SO TIMEOUT|SO TIMEOUT}} | |||
==tcpNoDelay== | |||
Enable/disable TCP_NODELAY on the underlying socket. See {{Internal|Socket TCP_NODELAY|TCP_NODELAY}} | |||
==soLinger== | |||
Enable/disable SO_LINGER with the specified linger time in seconds. The maximum timeout value is platform specific. The setting only affects socket close. Also see {{Internal|Socket SO_LINGER|SO_LINGER}} |
Latest revision as of 18:44, 10 May 2017
Internal
TODO
- AccessLogValve: https://home.feodorov.com:9443/wiki/Wiki.jsp?page=JBossLoggingForTroubleshootingWebApplications
Subjects
Connector Configuration
<!-- A AJP 1.3 Connector on port 8009 --> <Connector port="8009" address="${jboss.bind.address}" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3"/>
For more details on Connectors, see
maxThreads
Make sure the value configured for maxThreads at least matches the value of mod_jk2 max_connections, configured in workers2.properties file.
keepAliveTimeout
Represents the number of milliseconds the connector (AjpProcessor instance, for example) will wait for a subsequent request before closing the connection. If not set in the configuration, Tomcat won't attempt to set it on the socket, which means the AjpProcessor instance will read from socket indefinitely.
Internally, it is implemented invoking java.net.Socket#setSoTimeout() on the associated socket. According to the Socket class documentation, the call enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. With this option set to a non-zero timeout, a read() call on the InputStream associated with this Socket will block for only this amount of time. If the timeout expires, a java.net.SocketTimeoutException is raised, though the Socket is still valid. The option must be enabled prior to entering the blocking operation to have effect. The timeout must be higher than 0. A timeout of zero is interpreted as an infinite timeout.
When the timeout occurs:
- The AjpProcessor instance is added to the recycled processor queue maintained by the AjpConnectionHandler instance
- The underlying socket is closed
- The Worker instance is stored as "idle"
- curThreadsBusy is decremented
soTimeout
Has the same effect as setting 'keepAliveTimeout' above.
Also see
tcpNoDelay
Enable/disable TCP_NODELAY on the underlying socket. See
soLinger
Enable/disable SO_LINGER with the specified linger time in seconds. The maximum timeout value is platform specific. The setting only affects socket close. Also see