> On 19.03.2009 14:02, Jeff Fulmer wrote:
>>
>> If I stop the tomcat server tomcat2, there's no problem. It properly
>> closes the sockets and mod_jk/apache/linux knows the server went away.
>> But if I shutdown the network on tomcat2 (or yank the cable), mod_jk
>> continues to send packets to it. My socket table is filled with
>> connections to tomcat2:8009 in SYN_SENT. Apache continues to send every
>> other request to tomcat2. Since I use session stickiness, this only
>> effects half the users but still.
>
> This should be handled by the socket_timeout, which you set to 2 minutes.
> How does it behave, if you reduce your socket timeout say to 10 seconds?

MAJOR IMPROVEMENT. Here's my revised workers.properties file:

worker.list=balancer,status

# Definte default worker settings
worker.default.port=8009
worker.default.type=ajp13
worker.default.lbfactor=1
worker.default.socket_timeout=10
worker.default.reply_timeout=5000
worker.default.socket_keepalive=True
worker.default.ping_mode=P
worker.default.ping_timeout=5000
worker.default.connection_pool_timeout=600
worker.default.connection_pool_minsize=0

#------WORKER1-------
worker.worker1.reference=worker.default
worker.worker1.host=10.248.11.15

#------WORKER2-------
worker.worker2.reference=worker.default
worker.worker2.host=10.248.11.16

#------BALANCER------
worker.balancer.type=lb
worker.balancer.balance_workers=worker1,worker2
# Load balancing method can be [R]equest, [S]ession, [T]raffic, or [B]usyness
worker.balancer.method=R
# How runtime data are sync-ed. [O]ptimistic or [P]essimistic
worker.balancer.lock=O
worker.balancer.sticky_session=True
worker.balancer.max_reply_timeouts=5

# Status worker for managing load balancer
worker.status.type=status


And in my virtual host I have this:

<IfModule mod_jk.c>
  JkOptions +JkWatchdogInterval
  JkMount  /rp/*  balancer
  JkMount  /rp    balancer
  JkMount  /env/* balancer
  JkMount  /env   balancer
  JkMount  /jkmanager/*  status
</IfModule>

BTW: /jkmanager/* is at the server level, but I included it here for
Rainer...

Here's my remaining problem. After I shut down the network on tomcat2, I
have a few 30 second request transactions but each ensuing transaction is
pretty zippy. If I leave my browser sit idly for about a minute, I have
two 30 second transactions and each ensuing transaction is zippy. I
suspect I have two back-to-back 30 second transactions because the load
balancer sends me to apache1 then apache2 and each tries to reconnect to
the downed tomcat. After that fails, they keep me on the active tomcat.

Maybe this one be a problem once the system is taking live transactions
but it would be nice if I could increase the intervals that apache uses to
reconnect to the downed tomcat.

Any thoughts?

Jeff




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to