This has been discussed before, and I agree with Dave, and its not the function of pound to handle application errors.  We wrote a small app for HAPort, which checks the health of our web server.  If it sees problems, it stops listening on that port, and pound takes the machine out of the loop.  We also use the app when we need to take the machine out of the pool (for reboot or maintenance) -- stopping the app causes pound to stop forwarding requests.

Dave Steinberg wrote:
Michal Taborsky - Internet Mall wrote:
Hello everyone.

We run pound successfully, but one minor problem I was not able to solve. When the server is down (not listening on 80) or timing-out, all is well. It gets removed from the backend pool, works like charm. The problem is, when there is something wrong with the application (like we loose connection to the database). Our web application returns 503 Service unavailable header, which in my oppinion is correct behavior. But pound does not recognize this code and keeps the server in the pool, resulting in many clients receiving this error page.

Is it possible to make pound to remove this failed server from the pool, like it received no response? And try it later again.

I believe you could get something like this to work using the HAport option pound offers.  Build yourself a little custom application that goes and checks the internal consistency of your application, and accepts connections if the app is alive, or doesn't accept them if its not.

Not exactly what you were looking for, but an alternative nonetheless. Plus you can read the output from this program from another, say something like nagios, and integrate it with a larger monitoring system to get notified when there are problems.

Regards,