tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Noland <>
Subject Problems with ajp13, mod_jk, and load balancer
Date Thu, 21 Jun 2001 19:21:16 GMT
I'm having problems getting ajp13 working reliably with mod_jk and the load
balancer. Here is my configuration:

- 4 Sun Solaris Sparc machines with similar setup
- Apache 1.3.20
- Tomcat 3.2.2
- mod_jk compiled from Tomcat 3.2.2 source
- JDK 1.2.2
- Cisco Local Director sitting in front of Solaris machines, doing load
- Running servlet based application which uses HTTP sessions, by use of

On all four machines, I have the Tomcat set up to load
balance between all four machines, with lbfactor=1 and type=ajp13. The worker
names are the same in all four files with the same host. Everything seems to
work fine until I click reload on the browser a good 20-25 times when viewing a
servlet generated page. My application (which uses HTTP sessions stored on the
server) complains about an invalid session (basically it can't find the session
information for the session id passed). I turned the "prompt for cookies"
option on in my browser and found that after a good number of clicks, it tries
to issue me a new cookie from a different Tomcat! It looks like under "heavy"
load the load balancer tries to send me to a different Tomcat even though the
session id contains the worker name (ex. a164gy8s01.www3, where www3 is worker

I then tried the same test with a Linux machine running Apache 1.3.20 and
Tomcat 3.2.2. When clicking heavily, I get a 500 Server error. I noticed in the
jk_mod log file, it complains about no workers being available.

If I switch from ajp13 to ajp12, everything works fine in both scenarios
mentioned above. No 500 server errors or invalid sessions caused by the request
going to the wrong Tomcat. Is there a bug in ajp13 or is there some kind of
configuration I can tweak?


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

View raw message