I have a Java app running on Tomcat 7.0.21 with APR 1.4.7. The app runs on 64-bit Java 7 Update 1 on CENT OS servers, with an A10 load balancer that sends traffic to the servers. On average, each server is handling about 80 requests per second.
We are having problems with our network connections. In server.xml, if we have keepalive on (maxKeepAliveRequests value greater than 1), then each server has way too many connections in the ESTABLISHED state, and the load balancer's NAT pool overflowsbecause it has too many connections to track. If we have keepalive off (maxKeepAliveRequests value set to 1), then the number of ESTABLISHED connections goes way down and the load balancer seems ok, but the app starts refusing connections (we're not sure why). Does this make sense to you? I'm not clear about why setting maxKeepAliveRequests="1" would have such a drastic impact on the site's performance (especially since most of our static files are on Akamai's CDN). Here is what our Connectors in server.xml look like: <Connector port="8080" protocol="HTTP/1.1" URIEncoding="utf-8" connectionTimeout="5000" maxThreads="800" maxKeepAliveRequests="1" redirectPort="8443" /> <Connector port="8443" URIEncoding="utf-8" connectionTimeout="5000" maxThreads="800" maxKeepAliveRequests="1" SSLCertificateFile="/home/user/ssl/2010.www.foo.com.crt" SSLCertificateKeyFile="/home/user/ssl/www.foo.com.key" SSLCertificateChainFile="/home/user/ssl/intermediateCA.cer" scheme="https" secure="true" SSLEnabled="true" clientAuth="false" sslProtocol="TLS"/> Can anyone give me any insight on what the problem might be and how to troubleshoot this?