tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JNeuhoff <neuh...@mhccorp.com>
Subject Re: Apache mod_jk memory leak?
Date Wed, 17 Jan 2007 10:02:27 GMT

Yesterday, I indeed upgraded another server box to Apache 2.0.59, mod_jk
1.2.20, Tomcat 5.5.17, and also set the connection_pool_timeout=600 (is that
value 600 seconds, or milliseconds?). I then subjected this server to a
brief stresstest (roughly 50 simultanious HTTP sessions on Tomcat's end) and
noticed the following:

Of the two 'Apache.exe' processes running under the Apache2 NT service, one
grew in memory usage quickly from an initial 12MB to nearly 65MB, and stayed
at that level overnight, even though there were no further requests made to
that server since yesterday. I also noticed that a simple 'netstat -a'
reported 35 established connections:

<<
TCP    DAOHPRW2:1682          DAOHPRW2.essex.ac.uk:8009  ESTABLISHED
TCP    DAOHPRW2:4240          DAOHPRW2.essex.ac.uk:8009  ESTABLISHED
TCP    DAOHPRW2:4241          DAOHPRW2.essex.ac.uk:8009  ESTABLISHED
.....
>>

and another 35 established connection the opposite direction:

<<
TCP    DAOHPRW2:8009          DAOHPRW2.essex.ac.uk:1682  ESTABLISHED
TCP    DAOHPRW2:8009          DAOHPRW2.essex.ac.uk:4240  ESTABLISHED
TCP    DAOHPRW2:8009          DAOHPRW2.essex.ac.uk:4241  ESTABLISHED
....
>>

So, are the connections managed by mod_jk between Apache2 and Tomcat not
released from the connection pool, despite the connection_pool_timeout=600?

Ideally I'd like to set an upper limit of lets say 200 concurrent HTTP
Sessions for Tomcat, but I am not sure how exactly to configure the various
timeout values and limits for mod_jk and Apache accordingly. Our Tomcat
service makes MySQL queries and it can take at times a few seconds for
generating a response. Does Apache2 use  just one child process handling all
requests or connections?

J.Neuhoff




P.S.  
At the moment our server is configured like that:

httpd.conf:

<<
....
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a server process serves
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>
....
### mod_jk 1.x configuration for connecting to Tomcat 5.5
LoadModule    jk_module  modules/mod_jk.so
JkWorkersFile "C:/Program Files/Apache Software Foundation/Tomcat
5.5/conf/workers.properties"
JkLogFile     "C:/Program Files/Apache Software Foundation/Tomcat
5.5/logs/mod_jk.log"
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions     +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat     "%w %V %T %r %s"
JkMount  /jsp-examples/* ajp13
JkMount  /servletsp-examples/* ajp13
JkMount  /manager/* ajp13
JkMount  /ohpr/* ajp13
JkMount  /demo-b/* ajp13
....
>>

workers.properties:

<<
# Define 1 real worker using ajp13
worker.list=ajp13
# Set properties for worker1 (ajp13)
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009
worker.ajp13.connection_pool_timeout=600
>>

-- 
View this message in context: http://www.nabble.com/Apache-mod_jk-memory-leak--tf3023318.html#a8407489
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message