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

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.

WA-Mian

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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

 
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.