2

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
</Proxy>

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!

IsKor
  • 45
  • 3
  • 10

2 Answers2

1

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).

drzraf
  • 111
  • 2
-1

Is your mod proxy on?

I see the syntax as

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

Source: Apache Documentation

chicks
  • 3,639
  • 10
  • 26
  • 36
  • 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 : https://httpd.apache.org/docs/2.4/mod/core.html#timeout – 8080HouseFul 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