2

While tomcat6 is starting up all my http requests are retained by the server and sends the response when the server is up.

But when I use an apache2 as a proxy the apache2 responds inmediatly a 503 error when the tomcat is starting. How can I prevent this default behaviour of apache proxy?

My apache virtualhost configuration looks like:

<VirtualHost 0.0.0.0:[PORT]> ProxyPreserveHost On ProxyVia full <proxy> Order deny,allow Allow from all </proxy> ProxyPass /[PATH] http://localhost:8080/[PATH2] ProxyPassReverse /[PATH] http://localhost:8080/[PATH2] </VirtualHost> 

1 Answer 1

2

I have a possible solution but am not 100% satisfied with it. This seems to work with httpd version 2.2.22.

ProxyRequests Off ProxyPreserveHost On <Proxy balancer://mycluster> BalancerMember http://localhost:8080 </Proxy> ProxyPass / balancer://mycluster/ maxattempts=1000 ProxyPassReverse / balancher://mycluster/ 

The balancer parameter maxattempts sets the number of attempts that the balancer will use while cycling through balancer members and sending them requests while they fail. I'd rather have a solution with a timeout but I haven't found anything that worked other than maxattempts.

You must log in to answer this question.