tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jäkel, Guido <G.Jae...@dnb.de>
Subject RE: mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections pile up, connection_pool_timeout has no effect?
Date Wed, 31 Aug 2016 13:12:28 GMT
Dear Hildegard,

you wrote, you're using the worker MPM. What are the pool sizes for child workers and it's
threads, i.e. the values for  ServerLimit, ThreadsPerChild? And what's the minimum thread
pool size, i.e.   MinSpareThreads? 

Note that the AJP connection pool is used per child (and per tomcat backend definition if
you're using more than one). You use connection_pool_minsize=1.  Please also note, that the
spare threads will no gather to the lowest possible number of childs. May this facts explain
the "remaining idle" AJP connections?


But even if the number of connections is unexpected high -- this will not consome more memory
time by time after establishing. 


If you see a real leak, this will have another reason. One from my lessons learned: If you're
write access and error logs by a piped process like rotatelogs, this will "slowly and continuous
eat up memory", if it will not consume. This will e.g. happen, if rotatelogs can't create
files because of a broken path or lack of rights.

Greetings

Guido

>-----Original Message-----
>From: Hildegard Meier [mailto:daku8938@gmx.de]
>Sent: Wednesday, August 31, 2016 2:11 PM
>To: users@tomcat.apache.org
>Subject: mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections pile up, connection_pool_timeout
has no effect?
>
>Running:
>Ubuntu Trusty 14.0.4 LTS 64 Bit
>mod_jk/1.2.37
>Apache/2.4.7 (Ubuntu)
>
>Hello,
>
>I have much investigated into this, but have no idea, why the AJP connections from the
Apache (MPM worker) to the AJP
>backends pile up.
>They do not get closed, they stay in state ESTABLISHED.
>
>Over night, the idle connections should be closed from the pool, but the do not get closed,
they get more and more every
>day, and the RAM of the Apache server gets eaten up.
>
>We have the following /etc/libapache2-mod-jk/workers.properties:
>
>---
>
># not used
>workers.tomcat_home=/usr/share/tomcat6
># not used
>workers.java_home=/usr/lib/jvm/default-java
>ps=/
>
># General worker template
>worker.template_01.type=ajp13
>worker.template_01.socket_connect_timeout=3000
>worker.template_01.ping_mode=A
>worker.template_01.connection_pool_timeout=600
>worker.template_01.connection_pool_minsize=1
>worker.template_01.socket_keepalive=true
>worker.template_01.reply_timeout=1800000
>
>---
>
>and on the AJP backends (Jboss / EAP), we have also set the connectionTimeout to 600000
ms , as written in
>https://tomcat.apache.org/connectors-doc/common_howto/timeouts.html
>
>But even a Backend with low traffic, (maybe one request per minute) gets 300 established
AJP connections after some days.
>
>Here the content of /etc/apache2/mods-enabled/jk.conf:
>
><IfModule jk_module>
>
>    JkWorkersFile /etc/libapache2-mod-jk/workers.properties
>    JkLogFile /var/log/apache2/mod_jk.log
>    JkLogLevel info
>    JkShmFile /var/log/apache2/jk-runtime-status
>    JkWatchdogInterval 60
></IfModule>
>
>It looks like the JkWatchdog is not running? Or do the connections do not idle because
of some non-Apache requests like
>cping/cpong?
>
>Your support is much appreciated.
>
>Thanks
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@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