Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

proxy_ajp:error (70007)The timeout specified has expired:

Tags:

apache

tomcat

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
like image 477
Ondrej Tokar Avatar asked Aug 12 '15 21:08

Ondrej Tokar


1 Answers

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.

like image 57
Ondrej Tokar Avatar answered Oct 16 '22 11:10

Ondrej Tokar