Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I don't use AJP for load-balancing; I have a single Apache 2.2 instance that proxies some URLs to a single Tomcat 7 instance via AJP.

When Tomcat is down, the AJP proxy becomes disabled on the first failed request, and is not re-enabled when Tomcat is brought back up.

Is it possible to instruct Apache to not disable AJP connection, even though the backend is down, so that the proxy starts working the moment the backend is back online?

Here's an excerpt from my httpd.conf:

ProxyPass /my-web-app ajp://localhost:8009/my-we-app-1.0.2

And here's the log file when the backend is down:

[error] (OS 10061)No connection could be made because the target machine actively refused it.
[error] ap_proxy_connect_backend disabling worker for (localhost)
[error] proxy: AJP: failed to make connection to backend: localhost
share|improve this question

1 Answer 1

up vote 5 down vote accepted

Sure; instruct Apache to never wait to retry that backend connection (it's waiting 60 seconds, by default) with retry=0:

ProxyPass /my-web-app ajp://localhost:8009/my-we-app-1.0.2 retry=0
share|improve this answer
    
Awesome, that's what I needed, thanks. Never tried waiting >60 seconds, too impatient for that :D –  RustyX Jan 13 '12 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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