Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 67094 invoked from network); 18 Oct 2006 23:58:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Oct 2006 23:58:37 -0000 Received: (qmail 77851 invoked by uid 500); 18 Oct 2006 23:58:31 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 77813 invoked by uid 500); 18 Oct 2006 23:58:30 -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 77802 invoked by uid 500); 18 Oct 2006 23:58:30 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 77799 invoked by uid 99); 18 Oct 2006 23:58:30 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 16:58:30 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Oct 2006 16:58:30 -0700 Received: by brutus.apache.org (Postfix, from userid 33) id 795AA714314; Wed, 18 Oct 2006 16:57:36 -0700 (PDT) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 40792] New: - 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period Message-ID: X-Bugzilla-Reason: AssignedTo Date: Wed, 18 Oct 2006 16:57:36 -0700 (PDT) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=40792 Summary: 500 error from Tomcat causes modjk lb worker to consider tomcat unusable for timeout period Product: Tomcat 5 Version: 5.5.15 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Native:JK AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: ken@i2rd.com It seems that there is a bug in the error handling code in the lb worker. I was using a modjk/tomcat configuration with a lb worker and two ajp13 workers. One of the ajp13 workers was marked disabled and stopped. The other tomcat worker returned a 500 HTTP response for one user of the system. This caused the following log messages from modjk code: [Mon Oct 16 13:39:16 2006] [info] ajp_process_callback::jk_ajp_common.c (1375): Connection aborted or network problems [Mon Oct 16 13:39:16 2006] [info] ajp_service::jk_ajp_common.c (1719): Receiving from tomcat failed, because of client error without recovery in send loop 0 [Mon Oct 16 13:39:16 2006] [info] service::jk_lb_worker.c (677): unrecoverable error 400, request failed. Client failed in the middle of requ est, we can't recover to another instance. [Mon Oct 16 13:39:16 2006] [info] jk_handler::mod_jk.c (1970): Aborting connection for worker=lb The error caused other users at the time to receive 503 error from apache because modjk considered no workers to be OK. After awhile (about 1 minute) modjk recognized that the Tomcat worker was ok and started working again. In looking at the code, it appears that the problem might be that the worker's busy flag is not cleared in this snippet of code: (from jk_lb_worker.c: line 666 revision 1.89) else if (service_stat == JK_CLIENT_ERROR) { /* * Clent error !!! * Since this is bad request do not fail over. */ rec->s->errors++; rec->s->in_error_state = JK_FALSE; rec->s->in_recovering = JK_FALSE; rec->s->error_time = 0; *is_error = is_service_error; jk_log(l, JK_LOG_INFO, "unrecoverable error %d, request failed." " Client failed in the middle of request," " we can't recover to another instance.", is_service_error); JK_TRACE_EXIT(l); return JK_CLIENT_ERROR; } The JK_WORKER_IN_ERROR and JK_WORKER_USABLE macros check the is_busy flag so it seems that not clearing it could cause a problem. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org