Beier Michael
2012-03-02 10:19:11 UTC
Hi all,
we're running tomcat 7.0.23 on sun jdk 1.6.0_29, connected via ajp to httpd 2.2.21 using mod_jk 1.2.32.
I observed the behavior, that tomcat keeps threads in its ajp pool in keepalive state, regardless of which timeouts (connectionTimeout and keepAliveTimeout) are configured in tomcat.
I tested three connector configurations and with all I see connections in tomcat server status where the "Time" value amounts up to several million milliseconds, which is more than configured in connectionTimeout/keepAliveTimeout.
This results in having 60-80 percent of the thread pool being in state "keepAlive".
1)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false"
keepAliveTimeout="300000" connectionTimeout="300000" />
2)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false"
keepAliveTimeout="300000" />
3)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false" />
In mod_jk the connection_pool_timeout is set to the same value as connectionTimeout (only in seconds, not milliseconds).
I verified that the values are set correctly querying the parameters via JMX.
How can I avoid having so many threads in keepalive state - I don't have any idea at the moment and can't see that there is an error in my configuration.
Best regards,
Michael
Team SIS OIOAW (Web Basis)
EnBW Systeme Infrastruktur Support GmbH
Durlacher Allee 93
76131 Karlsruhe
Fon: +49 (7 21) 63 - 14545
Fax: +49 (7 21) 63 - 15099
mailto:***@enbw.com
EnBW Systeme Infrastruktur Support GmbH
Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim HRB 108550
Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
Geschäftsführer: Jochen Adenau, Hans-Günther Meier
we're running tomcat 7.0.23 on sun jdk 1.6.0_29, connected via ajp to httpd 2.2.21 using mod_jk 1.2.32.
I observed the behavior, that tomcat keeps threads in its ajp pool in keepalive state, regardless of which timeouts (connectionTimeout and keepAliveTimeout) are configured in tomcat.
I tested three connector configurations and with all I see connections in tomcat server status where the "Time" value amounts up to several million milliseconds, which is more than configured in connectionTimeout/keepAliveTimeout.
This results in having 60-80 percent of the thread pool being in state "keepAlive".
1)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false"
keepAliveTimeout="300000" connectionTimeout="300000" />
2)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false"
keepAliveTimeout="300000" />
3)
<Connector port="8309" protocol="AJP/1.3"
maxThreads="200" redirectPort="8343" tomcatAuthentication="false" />
In mod_jk the connection_pool_timeout is set to the same value as connectionTimeout (only in seconds, not milliseconds).
I verified that the values are set correctly querying the parameters via JMX.
How can I avoid having so many threads in keepalive state - I don't have any idea at the moment and can't see that there is an error in my configuration.
Best regards,
Michael
Team SIS OIOAW (Web Basis)
EnBW Systeme Infrastruktur Support GmbH
Durlacher Allee 93
76131 Karlsruhe
Fon: +49 (7 21) 63 - 14545
Fax: +49 (7 21) 63 - 15099
mailto:***@enbw.com
EnBW Systeme Infrastruktur Support GmbH
Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim HRB 108550
Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
Geschäftsführer: Jochen Adenau, Hans-Günther Meier