Hello,
We have two tomcat application that are load-balance by Apache via mod_proxy. Here is the configuration:
<Proxy balancer://tomcatcluster>
BalancerMember ajp://X.X.X.X:8009 route=tomcat-8000 ttl=10
BalancerMember ajp://X.X.X.X:9009 route=tomcat-9000 ttl=10
</Proxy>
ProxyPass / balancer://tomcatcluster/ stickysession=JSESSIONID nofailover=off
Sometimes it happens that one tomcat nodes becomes unhealthy due to OutOfMemoryErrors or other reasons. The two main symptoms would be non-responsiveness. Or returning HTTP status code 500 to requested pages.
At this point, the tomcat server is not healthy and Apache still does not disconnect it from the load-balanced nodes. This has an effect that some users get a:
status code 200 - if coming from the healthy tomcat node and
status code 500 - if coming from the unhealthy tomcat node
How can it be possible to tell Apache to remove a tomcat node if it returns status 500 many times?
Or are there other strategies in Apache to make this error handling better?
Thank you.