Have a look at http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html
You could lower you prepost_timeout. The Timeouts will help for unplanned downtimes. For planned downtimes you should administratively change the activation attribute of the load balancer members. Regards, Rainer Guofeng Zhang schrieb: > Hi, > > > > I use Apache as the load balancer and configured mod_jk to work in > failover mode. The master and slave run on separate machines. > > > > To test how the failover works, I shut down the master machine, then I > access my application. But it takes about one minute for me to see the > first page. I think the time is used to try to establish the socket > connection. > > > > I think I need to configure something that I missed in the > worker.properties so that mod_jk could detect the status of the master > before it sends the request to it. > > > > Thanks for your help very much. > > > > I use Apache HTTPD 2.2.4, mod_jk 2.2.4, JBoss 4.0.4/Tomcat 5.5. > > > > The following the log of mod_jk. > > > > [Wed Aug 22 17:24:59 2007][1632:1624] [info] mod_jk.c (2775): > mod_jk/1.2.24 initialized > > [Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_connect.c (473): connect > to 192.168.225.195:8009 failed (errno=60) > > [Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (891): > Failed opening socket to (192.168.225.195:8009) (errno=60) > > [Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (1311): > (master) error connecting to the backend server (errno=60) > > [Wed Aug 22 17:25:42 2007][1632:6124] [info] jk_ajp_common.c (2071): > (master) sending request to tomcat failed, recoverable operation > attempt=1 > > > > > > The following is the content of worker.properties. > > # Define list of workers that will be used > > # for mapping requests > > worker.list=loadbalancer,status > > > > # Define Master > > worker.master.host=192.168.225.195 > > worker.master.port=8009 > > worker.master.type=ajp13 > > worker.master.lbfactor=1 > > worker.master.cachesize=10 > > worker.master.cache_timeout=600 > > worker.master.socket_timeout=180 > > worker.master.recycle_timeout=100 > > worker.master.prepost_timeout=50 > > worker.master.recovery_options=0 > > > > # Define prefered failover node for master > > worker.master.redirect=slave > > > > # Define Slave > > worker.slave.host= 192.168.225.116 > > worker.slave.port=8009 > > worker.slave.type=ajp13 > > worker.slave.lbfactor=1 > > worker.slave.cachesize=10 > > worker.slave.cache_timeout=600 > > worker.slave.socket_timeout=180 > > worker.slave.recycle_timeout=100 > > worker.slave.prepost_timeout=50 > > worker.slave.recovery_options=0 > > > > #Disable slave for all requests except failover > > worker.slave.activation=disabled > > > > # Load-balancing behaviour > > worker.loadbalancer.type=lb > > worker.loadbalancer.balance_workers=master, slave > > worker.loadbalancer.sticky_session=1 > > > > # Status worker for managing load balancer > > worker.status.type=status > > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]