tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aadi Deshpande <mailingli...@clubmom-inc.com>
Subject trouble load balancing with mod_jk2
Date Mon, 02 Feb 2004 17:18:08 GMT

Greetings,

(Not sure if this is the place for mod_jk2 questions or if there is 
another mailing list)

I'm having trouble figuring out how loadbalancing should work using 
mod_jk2 with Apache2 and Tomcat 5.0.18.


I have 2 tomcat instances on 2 machines ( running with different port 
numbers )

I set them up in a single lb group, using the same lb factor of 80 ( a 
number I picked arbitrarily )

my lb configuration is set to graceful=1, stickySession=1, and timeout=0 
( i've appended my workers2.properties as additional info ).

However, it seems that when i turn on the apache2 and monitor the 
server, all the instances start going to the first instance in the list 
and bog that instance down.  There doesn't seem to be any load balancing 
going on, nor is there any sort of failover when the instance becomes 
unusable ( the thread pool hits the maximum of 200 )

The documentation on mod_jk2 isn't all that clear and a lot of it seems 
to be geared for implementing the jni mechanism as opposed to the 
channel socket ajp mechanism.

I must clearly be doing something wrong, but I can't figure it out.
Additional q's :

the mod_jk2 instance is constantly initing and shutting down.  Is this 
normal operating procedure?
does a higher lb factor or lower lb factor increase that machine's 
chances of being selected?
do  dashes ( - ) in the  server name have any effect?




I've listed my workers2.properties file inline for review.


Thanks in advance for any help.

Aadi Deshpande


##workers2.properties
[logger]
level=DEBUG
                                                                              

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0
                                                                              

[uriMap:]
info=Maps the requests. Options: debug
debug=0
                                                                              

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log
                                                                              

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=0000
debug=0
disabled=0
                                                                              

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0
                                                                              

[status:]
info=Status worker, display runtime information
                                                                              

[uri:/jkstatus/*]
info=Display status information and check the config file
group=status:
                                                                              

[lb:lb]
info=Default load balancer.
debug=0
stickySession=1
timeout=0
                                 [channel.socket:tc-server2:6090]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server2:6090

[channel.socket:tc-server2:6190]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server2:6190

[channel.socket:tc-server2:6290]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server2:6290

[channel.socket:tc-server1:6090]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server1:6090

[channel.socket:tc-server1:6190]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server1:6190
                                           [channel.socket:tc-server1:6290]
info=Ajp13 forwarding over socket
graceful=1
debug=0
lb_factor=80
group=lb
tomcatId=tc-server1:6290


[uri:/*.jsp]
info=Map the whole webapp
[uri:/*.sx]
info=Map the whole webapp



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message