Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 2638 invoked from network); 24 Sep 2003 07:46:27 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 24 Sep 2003 07:46:27 -0000 Received: (qmail 9699 invoked from network); 24 Sep 2003 07:46:41 -0000 Received: from unknown (HELO apache.org) (127.0.0.1) by 127.0.0.1 with SMTP; 24 Sep 2003 07:46:41 -0000 Message-ID: <3F714C34.8050806@apache.org> Date: Wed, 24 Sep 2003 09:48:04 +0200 From: Henri Gomez User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.4) Gecko/20030624 X-Accept-Language: fr, en MIME-Version: 1.0 To: Tomcat Developers List Subject: JK add-ons to fix problems with HUNG tomcats... References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: 127.0.0.1 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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....