I am trying to get load balancing working with Apache on Linux balancing
between two Tomcat 3.1 servers.  I'm having some strange problems, and
hopefully somebody can give me a tip.

I've used Tomcat 3.0, 3.1 and 3.2 betas on production systems since
Tomcat had the first production release, so I've got a fairly good idea
of how it works.  I'm new to using Apache to load-balance, however, so
I'm assuming I've got a problem with my Apache setup.

Here are the symptoms:
Apache successfully balances between the two servers for a while
(usually long enough to download 3-10 pages), then somehow loses its
connection.  I can still hit tomcat just fine by going straight to port
8080 on the tomcat servers.  Often, but not always, I get
"HANDLER THREAD PROBLEM Stream closed prematurely" error messages in the
logs on the Tomcat machines.

Note that I'm running Apache 1.3.12 (just the default build with RH 6.2,
nothing fancy), and I'm using mod_jserv as a module.

Here's the salient part of the httpd.conf file:

<IfModule mod_jserv.c>
    ApJServManual on
    ApJServDefaultProtocol ajpv12
    ApJServSecretKey DISABLED
    ApJServMountCopy on
    ApJServLogLevel notice

    ApJServMount default /zone1
    AddType text/jsp .jsp
    AddHandler jserv-servlet .jsp

    ApJServMount /examples balance://bsservers/zone1

    ApJServBalance bsservers BSWEB1
    ApJServBalance bsservers BSWEB2

    ApJServHost BSWEB1 ajpv12://172.16.1.151:8007
    ApJServHost BSWEB2 ajpv12://172.16.1.152:8007

    ApJServRoute WEB1 BSWEB1
    ApJServRoute WEB2 BSWEB2
    ApjServShmFile logs/jserv_shm
</IfModule>

The Tomcat install is basically just a stock 3.1 install, I didn't
change the config file except to take out the examples context any put
my .war file out there.

Any help would be really appreciated.  Thanks.
-- Mark Lewis
[EMAIL PROTECTED]

Reply via email to