[SOLVED] mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections pile up, connection_pool_timeout has no effect?

2016-09-01 Thread Hildegard Meier
Dear Guido,

many thanks for Your answer.

It looks, like the parameter reply_timeout=180 was the solution. I added 
that parameter yesterday and was not sure if that would help and since I go to 
vacation in short time, I asked in this list in parallel to maybe solve the 
problem before vacation in another way.

The documentation for reply_timeout 
(https://tomcat.apache.org/connectors-doc/reference/workers.html) says "By 
default (value zero) the webserver will wait forever which could be an issue 
for you." and it looks, like this really was an issue for us. It looks to me, 
like the JBoss backends do not give any reply to ajp requests sometimes(often?) 
and they are then kept established forever and pile up. They are not 
interpreted as idle, and therefore they do not get removed by JkWatchDog. Why 
the backend applications so often do not give any response, I think is another 
issue for the developers.

But maybe the importance of changing the reply_timeout parameter from default 
value "infinit" to a even very high value of 30 min should be stated even more 
prominent in the worker documentation.

> 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? 

/etc/apache2/mods-enabled/mpm_worker.conf

StartServers2
MinSpareThreads25
MaxSpareThreads75
ThreadLimit64
ThreadsPerChild35
MaxRequestWorkers 560
MaxConnectionsPerChild  1



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

I don't know, but I started investigating the Apache because it nearly run out 
of RAM some days ago, as Nagios informed. And the RAM usage of Apache clearly 
correlates with the count of AJP connections, as the Nagios graphs show.

Now, with connection pool cleanup working since yesterday, the count of AJP 
connections is radical lower then before, and also the RAM usage is radical 
lower in parallel :-)

Many thanks again, and

best regards,

Hilde

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Aw: mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections pile up, connection_pool_timeout has no effect?

2016-08-31 Thread Hildegard Meier
P.S. in workers.properties we use the template then with

worker.myhost.reference=worker.template_01
worker.myhost.host=10.20.30.40
worker.myhost.port=8809


> Gesendet: Mittwoch, 31. August 2016 um 14:10 Uhr
> Von: "Hildegard Meier" <daku8...@gmx.de>
> An: users@tomcat.apache.org
> Betreff: mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections 
> pile up, connection_pool_timeout has no effect?
> 
> 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=180
> 
> ---

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



mod_jk/1.2.37 Apache/2.4.7 (Ubuntu): AJP established connections pile up, connection_pool_timeout has no effect?

2016-08-31 Thread Hildegard Meier
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=180

---

and on the AJP backends (Jboss / EAP), we have also set the connectionTimeout 
to 60 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:



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


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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org