Hey Mark, thanks for reply.
I do have some more questions as the main configuration i not done by myself. We are using Apache 2.2.16 on Debian. Therefore MaxRequestWorkers is called MaxClients, isn't it? Currently it is set to 312. So if we have two tomcats with 200 thread each MaxClients is to low? I either should reduce the Thread at the connector or increase MaxClients? We got the connection_pool_timeout from here: https://community.jboss.org/wiki/OptimalModjk12Configuration I will have a look on the other recommended options Thanks.. Mit freundlichen Grüßen David Kumar Softwareentwickler, B. Sc. Abteilung Infotech - Interaktiv TELESTAR-DIGITAL GmbH Am Weiher 14 D-56766 Ulmen http://www.telestar.de/ -----Ursprüngliche Nachricht----- Von: Mark Thomas [mailto:ma...@apache.org] Gesendet: Dienstag, 12. März 2013 10:25 An: Tomcat Users List Betreff: Re: AJP suddenly Stopps acting: ajp on 7009 and 9009 : connections keept open On 12/03/2013 06:53, David Kumar wrote: > > Hey, > > we are still having that issue. But we could manage to figure out > some more stuff. We made a Tomcat and Java update since that time we > had our problem a few times again, also we did some reconfiguration > with connectors etc. The last 2 times we where able to see, that both > tomcat by them self where alive. Just ajp on both where dead. We > couldn't make a connection either trough 7009 nor 9009. An with our > openFiles trick we found a lot of close_wait again, e.g. 200 for > 9009. I left the second tomcat on this state for a few ours just to > see, what happens. The count of 200 connection with close_wait was > kept until a reboot of the tomcat. I would say with some of our > reconfiguration we managed to stop increasing connections. But still > we are not sure why our ajp connections dying.. > > Here is our connector out of Server.xml: > > <Connector port="9009" protocol="AJP/1.3" redirectPort="9443" > maxThreads="200" connectionTimeout="600000" /> Only 200 threads on the Tomcat side. If httpd's MaxClients/MaxRequestWorkers is greater than 200 you may get thread starvation in Tomcat. > worker.properties: > > worker.tomcatX.host=localhost > worker.tomcatX.type=ajp13 > worker.tomcatX.fail_on_status=404 That is a really bad idea. A single 404 and the entire Tomcat instance gets taken out of the loadbalancer for 60 seconds. Hello DOS attack. > worker.tomcatX.lbfactor=1 > worker.tomcatX.ping_timeout=1000 > worker.tomcatX.ping_mode=A > worker.tomcatX.socket_timeout=10 > worker.tomcatX.connection_pool_timeout=600 10 minutes is a long time to keep a persistent connection around. With even a moderate load you'll easily get to 200 connections in a 10 minute period. > worker.tomcat1.reference=worker.tomcatX worker.tomcat1.port=7009 > worker.tomcat2.reference=worker.tomcatX worker.tomcat2.port=9009 > > worker.loadbalancer.type=lb > worker.loadbalancer.balance_workers=tomcat1,tomcat2 > > worker.status.type=status > > Hopefully one of you guys can give us a hint to fix that problem. Do one of the following: 1. Increase maxThreads in Tomcat's connector to > MaxRequestWorkers 2. Use JkOptions +DisableReuse (ignore the performance warnings) 3. Reduce the connection_pool_timeout Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org