Reputation: 5080
I am getting the error in the error_log
. I was able to figure out that I need to increase ProxyTimeout
.
However, I was unable to find where may I change it. All I could do was adding this to the server.xml
:
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="600000"
redirectPort="8443" />
Any idea how to exactly increase the ProxyTimeout
?
I am using Ubuntu
from AWS
and Apache Tomcat v7
I have tried to add this into proxy-html.conf
:
ProxyRequests On
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost Off
ProxyTimeout 1200
I have also added this into httpd.conf
:
TimeOut 600
I have restarted the Tomcat server but neither of the above configurations helped.
Btw this is the exact error, I don't understand why there is proxy mentioned. I am not connecting through any proxy server... The issue happens when I submit a form, which triggers some tough processing. Then it times out in approx. 60 seconds. However, the program still runs, only the request times out.
Error:
[Thu Aug 13 07:34:21.677693 2015] [proxy_ajp:error] [pid 1515] (70007)The timeout specified has expired: AH01030: ajp_ilink_receive() can't receive header
[Thu Aug 13 07:34:21.677769 2015] [proxy_ajp:error] [pid 1515] [client 212.130.108.58:52206] AH00992: ajp_read_header: ajp_ilink_receive failed, referer: http://52.17.109.177/Visma_UploadInterface/MappingServlet
[Thu Aug 13 07:34:21.677782 2015] [proxy_ajp:error] [pid 1515] (70007)The timeout specified has expired: [client 212.130.108.58:52206] AH00878: read response failed from 127.0.0.1:8009 (localhost), referer: http://52.17.109.177/Visma_UploadInterface/MappingServlet
Upvotes: 37
Views: 118521
Reputation: 1
hey marked solution above is not fully right, it can help in very high latency but issue was entirely different since it fixed by reboot. we have also faced such issue. and the real reason was tomcat ajp port was occupied by nsrexecd service as attached in screenshot 8609. so we just restarted nsrexecd service and tomcat ajp port was released. we restarted tomcat again and it was serving ajp connection on 8609. nsrexecd consuming port 8609
In your case rebooting the server did the job, since it has restarted your specific service which has released tomcat port 8009 and started using different port other then 8009.
Upvotes: 0
Reputation: 1
I have resolved it modified existing virtual host configuration.
<Proxy "unix:/run/php/php7.2-fpm-example.sock|fcgi://localhost">
ProxySet timeout= 600
</Proxy>
<FilesMatch \.php$>
SetHandler "proxy:fcgi://localhost"
</FilesMatch>
Upvotes: 0
Reputation: 5080
I have solved it by adding this two simple lines into httpd.conf
file:
Timeout 600
ProxyTimeout 600
I also rebooted the whole server, not just Tomcat. No idea if that was necessary, but seems like it.
Upvotes: 51