On Fri, Oct 9, 2009 at 10:14 PM, Willy Tarreau <[email protected]> wrote: > On Fri, Oct 09, 2009 at 04:14:02PM -0400, Greg Gard wrote: >> hi, ... >> my >> question though is that i had maybe 200 500 errors today, but my stats >> page shows no problems. all of the haproxy ----- status codes are fine >> in the log no flags that i can see, just lots of server errors. are >> these not considered errors by haproxy stats? > > Exactly. Haproxy counts the errors that it is related to. Eg: timeouts, > disconnections, invalid HTTP messages, etc... But if the application > server returns an error 500, it normally forwards it and has no reason > to count an error if the response is correctly delivered. While I agree > it may sound surprizing at first, imagine the mess it would make for > people who balance outgoing HTTP proxies ! They would get a lot of false > errors when retrieving responses from random servers on the net.
I can see that the errors by the backend servers are not haproxy's errors or fault, but they are still errors to the end user and as a HA solution they should try to be minimised. So it would be useful to easily monitor these in haproxy. We have patched haproxy ( http://api1.osm.absolight.net/haproxy?stats ) to show backend errors in the 500 range as a separate column in the stats page. On top of that we have also patched it so that on 500 backend errors haproxy automatically and immediately marks that backend server down until the health checks confirm it is up again. Of cause, the latter is not safe in general, the HTTP proxy scenario you give is a good example, but it is nice to have it as an option and at least in our scenario it has been very useful. But that is a different issue. Kai > > Regards, > Willy > > >

