11

This is my mod_proxy config:

<IfModule mod_proxy.c>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPass /manage/ http://localhost:9000/manage/
ProxyPassReverse /manage/ http://localhost:9000/manage/
</IfModule>

I find that whenever the other website I have on port 9000 doesn't respond correctly, I get sustained 503 errors - that persist even after the website is fixed. In other words, the 503 response seems to be cached.

How can I disable it? I don't think I have enabled caching myself, perhaps this is the default.

ripper234
  • 5,710
  • 9
  • 40
  • 49
  • It seems that mod-proxy itself does not do any caching. Did you check your browser cache? – Khaled Jan 16 '12 at 10:18
  • @Khaled - check out the answer by Shane. – ripper234 Jan 16 '12 at 19:13
  • possible duplicate of [mod_proxy returns 503 errors even after proxied service is back up](http://serverfault.com/questions/265199/mod-proxy-returns-503-errors-even-after-proxied-service-is-back-up) – ripper234 Mar 19 '12 at 11:28

1 Answers1

14

mod_proxy marks an unresponsive backend as down when it seems to be down; if no backends are available then it responds with a 503.

By default, a down backend will be marked as such for 60 seconds; until that time passes, it won't retry the connection (and replies with an error message to any connecting clients).

To have it retry immediately, add retry=0 to your ProxyPass directive:

ProxyPass /manage/ http://localhost:9000/manage/ retry=0
Shane Madden
  • 112,982
  • 12
  • 174
  • 248