Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5775810074 for ; Tue, 12 Nov 2013 18:17:27 +0000 (UTC) Received: (qmail 38641 invoked by uid 500); 12 Nov 2013 18:17:26 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 38577 invoked by uid 500); 12 Nov 2013 18:17:25 -0000 Mailing-List: contact dev-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 dev@httpd.apache.org Received: (qmail 38569 invoked by uid 99); 12 Nov 2013 18:17:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Nov 2013 18:17:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [173.201.192.235] (HELO p3plsmtpa07-06.prod.phx3.secureserver.net) (173.201.192.235) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Nov 2013 18:17:19 +0000 Received: from hub ([76.252.112.72]) by p3plsmtpa07-06.prod.phx3.secureserver.net with id oiGw1m00C1Zmh9Y01iGxgW; Tue, 12 Nov 2013 11:16:57 -0700 Date: Tue, 12 Nov 2013 12:16:51 -0600 From: "William A. Rowe Jr." To: dev@httpd.apache.org Cc: covener@gmail.com Subject: Re: RLIMIT_NPROC on Linux? Message-ID: <20131112121651.1d261697@hub> In-Reply-To: References: <5280CDE6.8000109@apache.org> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.19; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Tue, 12 Nov 2013 09:04:13 -0500 Eric Covener wrote: > On Mon, Nov 11, 2013 at 7:30 AM, Ruediger Pluem > wrote: > > > > > > Eric Covener wrote: > >> I was looking at a typical apr_thread_create failure for creating a > >> large # of threads on a system, and the only solution was to > >> increase roots RLIMIT_NPROC as opposed to the (httpd.conf > >> configured) "User" limits > > > > I assume that you configured that via /etc/security/limits.conf? > > Yep. I still haven't figured out if the target users ulimits ever > matter (around setuid() call, as implied by the manual) or if it's > 100% root. So to further clarify, your understanding right now is that... - root's soft ulimit overriden by any ulimit -u in the startup script is honored for the parent httpd process - ulimit is not replaced with User's limits during startup/setuid - the User's hard ulimit is checked and causes the startup to fail if the (root) soft ulimit then exceeds the user's max hard limit? Is that correct? I'm working on a simple module to report the limits at various phases of the startup, since this affects any httpd version, and patching all of the flavors to report this info seems convoluted for diagnostics. Should have an update/source by tomorrow.