tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryszard Łach <ryl...@gmail.com>
Subject How to switch off retries for LB worker?
Date Fri, 15 Jan 2010 13:07:49 GMT
Hi.
I'm testing mod_jk 1.2.28 trying to fine tune retries, reply_timeout and
max_reply_timeouts. Let's begin from retries.

I have a simple servlet, which returns text/plain 'OK' after time (in
seconds) given in url. I've set reply_timeout to 3s for worker first and to
6s for worker second. After executing request which should be served by
tomcat in 4 seconds I get in log:

[Fri Jan 15 13:59:29.247 2010] [15837:1208981840] [error]
ajp_get_reply::jk_ajp_common.c (1926): (first) Timeout with waiting reply
from tomcat. Tomcat is down, stopped or network problems (errno=110)
[Fri Jan 15 13:59:30.253 2010] [15837:1208981840] [info]
ajp_service::jk_ajp_common.c (2447): (first) sending request to tomcat
failed (recoverable), because of reply timeout (attempt=1)
[Fri Jan 15 13:59:30.253 2010] [15837:1208981840] [error]
ajp_service::jk_ajp_common.c (2466): (first) connecting to tomcat failed.
[Fri Jan 15 13:59:30.253 2010] [15837:1208981840] [info]
service::jk_lb_worker.c (1384): service failed, worker first is in error
state
[Fri Jan 15 13:59:34.260 2010] lbeuro(first) 8.016698 2  80
/timeout.ltr?timeout=4

Of course the worker which served the request was second, not first, I
suppose the log entry is an effect of bug
46337<https://issues.apache.org/bugzilla/show_bug.cgi?id=46337>
.

The question is: how can I force mod_jk not to try other workers at all?

Here is my config:

worker.list=mylb

worker.status.type=status

worker.mylb.type=lb
worker.mylb.balance_workers=first,second
worker.mylb.sticky_session=true
worker.mylb.sticky_session_force=false
worker.mylb.method=B
worker.mylb.retries=0

worker.lbtemplate.port=8409
worker.lbtemplate.type=ajp13
worker.lbtemplate.lbfactor=1
worker.lbtemplate.fail_on_status=-500,503
worker.lbtemplate.ping_mode=A
worker.lbtemplate.socket_timeout=300
worker.lbtemplate.ping_timeout=10000
worker.lbtemplate.retries=0

worker.first.host=
worker.first.reference=worker.lbtemplate
worker.first.reply_timeout=3000

worker.second.host=
worker.second.reference=worker.lbtemplate
worker.second.reply_timeout=6000

Cheers,

R.

-- 
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message