I have an issue with Apache proxies.

I was asked to let the connection between Apache and the web client opened, because we are working on SSE. The problem is that by default the timeout is 60secs. I would like to increase this value significantly, and I found the ProxyTimeout directive which is great BUT it increases the timeout for ALL proxies. On my conf I have multiple ajp proxies, and I would have liked to apply the ProxyTimeout only to /test:

ProxyPass /test ajp://some_ip:8009/some_URL
ProxyPassReverse /test ajp://some_ip:8009/some_url

ProxyPass /test2 ajp://some_ip2:8009/some_url2
ProxyPassReverse /test2 ajp://some_ip2:8009/some_url2

Is there a way to do so?

So far I tested with: ConnectionTimeout and ProxyPass /test ajp://some_ip:8009/some_URL timeout=120 to no avail.

I even tried to specify a timeout with a Proxy block:

<Proxy "ajp://some_ip:8009/some_url">
Proxyset timeout=10

but again it failed.

I am not familiar with levels of timeout in Apache (I know there are some), and my knowledge of Apache is rather limited.

Thanks for you help!


It's currently not possible because directives inside <Proxy> are only read at server-start time rather than after each request.

Hope may come from https://bz.apache.org/bugzilla/show_bug.cgi?id=62422

After introducing a "Proxy" context, it should become possible to generically modify proxy settings (ProxySet) according to request being served (eg: its URL among other).


Is your mod proxy on?

I see the syntax as

<Proxy "http://backend.example.com">
  ProxySet connectiontimeout=5 timeout=30

Source: Apache Documentation

  • Yes, mod_proxy is on, with or without timeout value I can see that they are working well. In fact I seek to increase the timeout between Apache and the client, not the timeout between Apache and Tomcat.
    – IsKor
    Apr 13 '17 at 15:00
  • Can you check if you have an entry In your httpd.conf (in server config or vhost config) TimeOut 600 (in seconds) . Also please read TimeOut Directive here : httpd.apache.org/docs/2.4/mod/core.html#timeout Apr 14 '17 at 19:51
  • Thanks for your answer! I don't have any TimeOut directive anywhere in my config files. I already read the doc for this directive but it's rather succinct and does not help me that much...
    – IsKor
    Apr 26 '17 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.