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

Reply via email to