Hi to all,

After the yesterday post of David Rees (mod_jk does not detect a hung Tomcat), I take a look at ajp/jk and make some works to fix the problem.

In fact the problem is in jk since the begining as jk use sockets in blocking mode.

The works I conducted :

- Modify ajp protocol on java side to accept a PING message (0x08).
  This message will be answered by low level ajp layer by a ..
  PONG(0x09).

- On the jk (not jk2 for now) I added 3 optional timeouts :

  a connect_timeout, which when set will send a PING request
  after connection and wait for PONG reply up to connect_timeout ms.

  a prepost_timeout, which when set will send a PING request before
  trying to send the real request to tomcat.

  in fine I added the long awaited reply_timeout, which will make
  jk wait up to reply_timeout ms before failing in error.


With such 3 timeouts (optional in workers.properties), we should be able to detect any problem with remote tomcats and as such make a better use of tomcat clusters via Load-Balancing.

If nobody object, I'll commit it this afternoon CET for review and
comments.

Note, that by default jk works as before....




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to