I've configured Apache tomcat7 as backend & apache2.2 as frontend both on same CentOS 6 server & here is part of my configurations:
In Server.xml I have:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" connectionTimeout="600000" maxKeepAliveRequests="100" URIEncoding="UTF-8"/> & in httpd.conf:
ProxyRequests Off Timeout 600 ProxyTimeout 600 ProxyPass / ajp://localhost:8009/ ProxyPassReverse / ajp://localhost:8009/ The problem is that some servlets on my tomcat server takes about 3 minutes to complete, but after one minute the opened socket to server (no matter what client I use, whether browser or any other client application) is closed by server unexpectedly (anyway, servlet execution continues until the end, even after socket was closed).
In sysctl.conf I changed value for net.ipv4.tcp_fin_timeout to 600 and I'm sure that it's not an OS timeout problem, because when I access another time-consuming script without mod_proxy (e.g. a PHP script with 3 minutes execution time on same apache server), it works fine with all clients.
Any suggestion will be appreciated