I've a Apache Server (Server version: Apache/2.2.22 (Ubuntu)) in front of a set of three tomcat6 servers. Apache is set up as a load balancer using mod_proxy and the AJP connector:
<VirtualHost *:80>
ProxyRequests off
<Proxy balancer://mycluster>
BalancerMember ajp://localhost:8009 keepalive=On retry=1 timeout=15 ping=1
BalancerMember ajp://10.0.3.152:8009 keepalive=On retry=1 timeout=15 ping=1
BalancerMember ajp://10.0.3.153:8009 keepalive=On retry=1 timeout=1 ping=15
Order Deny,Allow
Deny from none
Allow from all
ProxySet lbmethod=byrequests
</Proxy>
<Location /balancer-manager>
SetHandler balancer-manager
Order deny,allow
Allow from all
</Location>
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/
</VirtualHost>
Tomcat is running with the following JAVA_OPTS:
-Xms2048m -Xmx2048m -XX:NewSize=256m
-XX:MaxNewSize=356m -XX:PermSize=256m -XX:MaxPermSize=356m
The system works fine, however after a while I receive these errors from Tomcat:
org.apache.jk.common.ChannelSocket processConnection
WARNING: processCallbacks status 2
And this one from Apache:
[error] ajp_read_header: ajp_ilink_receive failed
[error] (70007)The timeout specified has expired: proxy: read response failed from 127.0.0.1:8009 (localhost)
[error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
I have to restart Tomcat to make it works again.
Any idea about what's happening??? After googling for a while it seems that this's a pretty common issue, however I didn't find a proper solution.
Thanks for your help!