httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kashif_tomcat <>
Subject [users@httpd] Apache Load Balancing issue using in cluster envionment of tomcat.
Date Mon, 10 Nov 2008 07:39:23 GMT

Hi All,

i am doing clustering with load balance environment and got stuck with an
issue. can anyone please help me ... below is scenario.

i have two servers running tomcat 1 and 2 (running in cluster)and apache is
on server with tomcat 1.
here is load balancing entries. 

<Proxy balancer://ajpcluster >
	BalancerMember ajp:// route=tomcat1 loadfactor=100
	BalancerMember ajp:// route=tomcat2 status=+H
ProxyPass /vopium/ balancer://ajpcluster/vopium/
ProxyPassReverse /vopium/ balancer://ajpcluster/vopium/

when i make tomcat 1 down then all hits transfers to tomcat 2 with no delay
with same session state. but after that when i make  tomcat1 up and tomcat 2
down then it shows me Service Temporarily Unavailable for at least 15 or
more seconds and in apache error logs i get following message 

[error] ap_proxy_connect_backend disabling worker for (
[error] proxy: AJP: failed to make connection to backend:
[error] proxy: BALANCER: (balancer://ajpcluster). All workers are in error
[error] proxy: BALANCER: (balancer://ajpcluster). All workers are in error
state (EVEN tomcat 1 is up and running)

and after 15 or more seconds apache sends all hits to tomcat 1 and session
starts from same position with no screen crashing. 

now if i use following entries 

<Proxy balancer://ajpcluster >
	BalancerMember ajp://192168.0.5:8009 route=tomcat2 loadfactor=100
	BalancerMember ajp:// route=tomcat1 status=+H

then i get reverse results. means if 2 is down then apache moves to tomcat 1
with no delay with same session state but after that if 2 gets up and 1 gets
down then it takes 15 or more seconds to switch to tomcat 2 with same
session state while showing Service Temporarily Unavailable for that time

now if i use following enrtries 

<Proxy balancer://ajpcluster >
	BalancerMember ajp:// route=tomcat1 loadfactor=50
	BalancerMember ajp:// route=tomcat2 loadfactor=50

then it always take some time to switch to any other server. means if 1 gets
down with 2 is up then for some time Service Temporarily Unavailable and
then session starting from same position from tomcat2. and if 2 gets down
with 1 is up then again  for some time Service Temporarily Unavailable page
and then session starting from same position from tomcat1.

i have tried different ways too but no success. i ll be very thankful to
anyone how can help me in this regard.

Thanks in anticipation
View this message in context:
Sent from the Apache HTTP Server - Users mailing list archive at

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message