0

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

1 Answer 1

0

Try setting up connection timeout in Proxy directive like below

ProxyPass / ajp://localhost:8009/ connectiontimeout=600 timeout=600 ProxyPassReverse / ajp://localhost:8009/ 

I used these settings for my App and it was working fine

1
  • I've already tried it with no difference in the result! Commented Sep 25, 2016 at 9:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.