How to re-activate disabled Apache 2.2 AJP connections?

16,791

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:
16,791

Related videos on Youtube

rustyx
Author by

rustyx

Updated on September 18, 2022

Comments

  • rustyx
    rustyx over 1 year

    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
    
  • rustyx
    rustyx over 12 years
    Awesome, that's what I needed, thanks. Never tried waiting >60 seconds, too impatient for that :D