We have apache2 proxy server at front end and running couple of application servers at backend, one of the buggy app server hangs and reboots, which takes 2-4 minutes, during this time all of other apps servers hangs as well, as they go through same proxy server.

Here below is the Apache proxy config:

ProxyPass        /app1 http://backend1:8080/ 
ProxyPassReverse /app1 http://backend1:8080/ 

ProxyPass        /app2 http://backend2:8080/ 
ProxyPassReverse /app2 http://backend2:8080/ 

ProxyPass        /app3 http://buggy-backend3:8080/ 
ProxyPassReverse /app3 http://buggy-backend3:8080/ 

Is there any apache directive, which check if backend is not responding should ignore it, and keep serving the others.

Will much appreciate any help.



I think you want to use something like haproxy which is designed for exactly this kind of thing. apache mod_proxy_balancer may also do what you need.

EDIT: I suspect the reason apache hangs is that the timeout is set to a relatively large number and apache will be running of child processes which are waiting for the hung app server.

ProxyTimeout will give you a way to get apache to timeout a backend quicker.

You could also look at increasing the number of children apache is allowed to spawn and increasing that number.

  • Hi Many thanks for reply, They are 3 separate application servers, so we don't need to load balance at the moment. – WA-Mian Jan 23 '13 at 17:19
  • ok. Edited with an alternative fix – drone.ah Jan 23 '13 at 17:37
  • Thank you for your help, We did decrease proxy timeout for buggy backend and increased the apache child processes, it did the trick, now our 2 rest of apps servers are ok, when 3rd is even down bit longer. – WA-Mian Jan 25 '13 at 15:38

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.