Bug 53651 - Worker failure doesn't have same behaviour as worker connection failure
Summary: Worker failure doesn't have same behaviour as worker connection failure
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy (show other bugs)
Version: 2.4.2
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-03 16:46 UTC by David Newcomb
Modified: 2012-08-06 13:58 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Newcomb 2012-08-03 16:46:02 UTC
The documentation for failonstatus (http://httpd.apache.org/docs/2.4/mod/mod_proxy.html) states that the behaviour will be the same as other worker errors and this is not the case.
===

Platform: Apache 2.4.2 on CentOS under VirtualBox

Apache mod_proxy & mod_proxy_balancer with 2 IIS boxes running a .net application. When application is not running but IIS is, then IIS (correctly) returns 500 error code responses for requests directed at the application.

If I switch off IIS so Apache can't connect mod_proxy_balancer (or something) puts the other machine into error state and automatically retries another worker.
If I switch IIS back on so that it starts returning 500 error statuses the failonstatus detects the failure and places the worker machine into error state however it throws that failure back up the call stack to the client so that the client gets proxy error from apache.

The documentation for failonstatus (http://httpd.apache.org/docs/2.4/mod/mod_proxy.html) states that the behaviour will be the same as other worker errors and this is not the case.

My config ( but it's pretty standard ...and it's a test environment! ):

ProxyRequests Off
<Proxy *>
        Order deny,allow
        Allow from all
</Proxy>

<Proxy balancer://qtube>
        # 500 Internel server error
        # 501 Not implemented ( need to throw back to client )
        # 502 Bad Gateway. The proxy server received an invalid response from an upstream server
        # 503 Service unavailable

        ProxySet lbmethod=byrequests failonstatus=500,502,503

        BalancerMember http://10.165.250.201:80/mydir connectiontimeout=1 timeout=5 retry=30
        BalancerMember http://10.165.250.206:80/mydir connectiontimeout=1 timeout=5 retry=30

        Order deny,allow
        Allow from all

</Proxy>

<Location /mydir>
        ProxyPass balancer://qtube
        ProxyPassReverse balancer://qtube
        Order allow,deny
        Allow from all
</Location>

<Location /balancer-manager>
        SetHandler balancer-manager

        Order deny,allow
        Allow from all
</Location>
Comment 1 David Newcomb 2012-08-06 13:58:30 UTC
Thought I'd include as someone else has asked pretty much the same thing in the mailing list.  Daniel Ruggeri says not possible at the moment but he'd like to do it when he gets time!

http://mail-archives.apache.org/mod_mbox/httpd-users/201206.mbox/%3C4FDFAA65.8090007@primary.net%3E

It would appear that is no way to do this so perhaps you could update the documentation to say that even though the worker goes into error state the request is not retried as it would have been for a connection error.

Then can you make this a feature request.