Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 1879 invoked from network); 3 Jun 2007 07:00:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2007 07:00:30 -0000 Received: (qmail 85486 invoked by uid 500); 3 Jun 2007 07:00:26 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 85438 invoked by uid 500); 3 Jun 2007 07:00:26 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 85427 invoked by uid 500); 3 Jun 2007 07:00:26 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 85423 invoked by uid 99); 3 Jun 2007 07:00:26 -0000 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jun 2007 00:00:25 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 1A3031A981A; Sat, 2 Jun 2007 23:59:42 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r543852 - /tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Date: Sun, 03 Jun 2007 06:59:41 -0000 To: tomcat-dev@jakarta.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070603065942.1A3031A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mturk Date: Sat Jun 2 23:59:41 2007 New Revision: 543852 URL: http://svn.apache.org/viewvc?view=rev&rev=543852 Log: Handle the disconnected sockets logging differently from the dead one. Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=543852&r1=543851&r2=543852 ============================================================================== --- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original) +++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sat Jun 2 23:59:41 2007 @@ -1212,9 +1212,18 @@ if (err || ((rc = ajp_connection_tcp_send_message(ae, op->request, l)) != JK_TRUE)) { if (rc != JK_FATAL_ERROR) { - jk_log(l, JK_LOG_INFO, - "(%s) error sending request. Will try another pooled connection", - ae->worker->name); + if (err == 1) { + jk_log(l, JK_LOG_DEBUG, + "(%s) failed sending request. " + "Will try another pooled connection", + ae->worker->name); + } + else { + jk_log(l, JK_LOG_INFO, + "(%s) error sending request. " + "Will try another pooled connection", + ae->worker->name); + } ajp_next_connection(ae, l); } else { @@ -1236,13 +1245,27 @@ * If we failed to reuse a connection, try to reconnect. */ if (!IS_VALID_SOCKET(ae->sd)) { - if (err) { - /* XXX: If err is set, the tomcat is either dead or disconnected */ + if (err == 1) { + /* If err is set, the tomcat is disconnected */ + jk_log(l, JK_LOG_INFO, + "(%s) all endpoints are disconnected", ae->worker->name); + JK_TRACE_EXIT(l); + return JK_FALSE; + } + else if (err) { + /* If err is set, the tomcat is dead */ jk_log(l, JK_LOG_INFO, - "(%s) all endpoints are %s", - ae->worker->name, err == 1 ? "disconnected" : "dead"); + "(%s) all endpoints are dead", ae->worker->name); + /* TODO: What is the purpose of the following log message? + * IMO it is very confusing and does not reflect the + * real reason (CPING/CPONG failed) of the error. + * Further more user might deliberately set the + * connectionTimeout and this is normal operational + * message in that case. + */ jk_log(l, JK_LOG_INFO, - "(%s) increase the backend idle connection timeout or the connection_pool_minsize", + "(%s) increase the backend idle connection " + "timeout or the connection_pool_minsize", ae->worker->name); JK_TRACE_EXIT(l); return JK_FALSE; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org