Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 69608 invoked from network); 4 Feb 2010 16:01:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2010 16:01:14 -0000 Received: (qmail 60729 invoked by uid 500); 4 Feb 2010 16:01:13 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 60647 invoked by uid 500); 4 Feb 2010 16:01:13 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 60638 invoked by uid 99); 4 Feb 2010 16:01:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 16:01:13 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 16:01:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6E9E523889CB; Thu, 4 Feb 2010 16:00:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r906535 - in /httpd/httpd/trunk: CHANGES server/mpm/worker/worker.c Date: Thu, 04 Feb 2010 16:00:52 -0000 To: cvs@httpd.apache.org From: poirier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100204160052.6E9E523889CB@eris.apache.org> Author: poirier Date: Thu Feb 4 16:00:51 2010 New Revision: 906535 URL: http://svn.apache.org/viewvc?rev=906535&view=rev Log: worker: don't report server has reached MaxClients until it does. Add warning when within MinSpareThreads. PR: 46996 Modified: httpd/httpd/trunk/CHANGES httpd/httpd/trunk/server/mpm/worker/worker.c Modified: httpd/httpd/trunk/CHANGES URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=906535&r1=906534&r2=906535&view=diff ============================================================================== --- httpd/httpd/trunk/CHANGES [utf-8] (original) +++ httpd/httpd/trunk/CHANGES [utf-8] Thu Feb 4 16:00:51 2010 @@ -2,6 +2,10 @@ Changes with Apache 2.3.6 + *) worker: Don't report server has reached MaxClients until it has. + Add message when server gets within MinSpareThreads of MaxClients. + PR 46996. [Dan Poirier] + *) mod_session: Session expiry was being initialised, but not updated on each session save, resulting in timed out sessions when there should not have been. Fixed. [Graham Leggett] Modified: httpd/httpd/trunk/server/mpm/worker/worker.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/worker/worker.c?rev=906535&r1=906534&r2=906535&view=diff ============================================================================== --- httpd/httpd/trunk/server/mpm/worker/worker.c (original) +++ httpd/httpd/trunk/server/mpm/worker/worker.c Thu Feb 4 16:00:51 2010 @@ -1547,14 +1547,27 @@ if (free_length == 0) { /* scoreboard is full, can't fork */ if (active_thread_count >= ap_daemons_limit * threads_per_child) { - static int reported = 0; - if (!reported) { - /* only report this condition once */ - ap_log_error(APLOG_MARK, APLOG_ERR, 0, - ap_server_conf, - "server reached MaxClients setting, consider" - " raising the MaxClients setting"); - reported = 1; + /* no threads are "inactive" - starting, stopping, etc. */ + /* have we reached MaxClients, or just getting close? */ + if (0 == idle_thread_count) { + static int reported = 0; + if (!reported) { + /* only report this condition once */ + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "server reached MaxClients setting, consider" + " raising the MaxClients setting"); + reported = 1; + } + } else { + static int reported = 0; + if (!reported) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, + ap_server_conf, + "server is within MinSpareThreads of MaxClients, " + "consider raising the MaxClients setting"); + reported = 1; + } } } else {