Hi!

I've experimenting with different timeout values, to mod_jk. I have not yet been able to make it work the way I want.

I have one apache and two tomcat. I have set up tomcat1 to be the primary and tomcat2 the failover.

What I want to achieve is if at least one tomcat is up I want it to work but if both are down (either tomcat or ip, crashed or blocked by a firewall dropping packets) i want mod_jk to serve an error page as quickly as possible, in my opinion it should be immediate. The thing is also that there are a few requests that actually do take some seconds (10-20 maybe) before they return a page and we do not want these to time out.

The first part is no problem: As long as _at least_ one tomcat is working and accessible by the mod_jk it works fine. (Even if I turn the tomcats on and off and block one by using a firewall during runtime.)

The part I can't get to work is if both tomcats are unavailable by the mod_jk. The request is stalled and waiting a lot of or infinite time before returning the error page. (In my test case I have blocked both by a dropping firewall, which in our case can be a realistic problem.)

Versions:
Apache/1.3.33 (Debian GNU/Linux)
mod_jk/1.2.21
tomcat 5.5.x

My questions:
* Can anyone help me on what timeout values to use i worker.properties?
* Does anyone know about a "best practices"-page on timeout values on mod_jk? * Is there a description about how the connection handling between the mod_jk works and how the timeouts fit in?


... and yes I have read about the timeout properties
http://tomcat.apache.org/connectors-doc/reference/workers.html
about the ajp "spec"
http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html
and searched for best practices and working examples on the net.

Thanks in advance for any help
Erik Melkersson

*httpd.conf*
<Location /test/cms/>
  SetEnv JK_WORKER_NAME cms
  SetHandler jakarta-servlet
  ErrorDocument 503 /index-cmsfail.html
</Location>


*worker.properties (as it looked during my last test, infinite waiting)*
worker.list=cms,jkstatus

worker.jkstatus.type=status

worker.cms.type=lb
worker.cms.balance_workers=cmsfront1,cmsfront2

worker.cmsfront1.type=ajp13
worker.cmsfront1.host=polopoly9-front1.unit.liu.se
worker.cmsfront1.port=8009
worker.cmsfront1.lbfactor=1
worker.cmsfront1.redirect=cmsfront2
#worker.cmsfront1.socket_timeout=60
#worker.cmsfront1.connect_timeout=2000
worker.cmsfront1.prepost_timeout=1000
#worker.cmsfront1.reply_timeout=30000

worker.cmsfront2.type=ajp13
worker.cmsfront2.host=polopoly9-front2.unit.liu.se
worker.cmsfront2.port=8009
worker.cmsfront2.lbfactor=1
worker.cmsfront2.activation=disabled
#worker.cmsfront2.socket_timeout=60
#worker.cmsfront2.connect_timeout=2000
worker.cmsfront2.prepost_timeout=1000
#worker.cmsfront2.reply_timeout=30000

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to