From owner-freebsd-questions Sun Jun 15 11:59:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA20989 for questions-outgoing; Sun, 15 Jun 1997 11:59:12 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id LAA20967; Sun, 15 Jun 1997 11:59:08 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA16701; Sun, 15 Jun 1997 11:50:57 -0700 From: Terry Lambert Message-Id: <199706151850.LAA16701@phaeton.artisoft.com> Subject: Re: help, running out of processes. :( To: joe@pavilion.net (Josef Karthauser) Date: Sun, 15 Jun 1997 11:50:57 -0700 (MST) Cc: questions@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <19970615140935.59168@pavilion.net> from "Josef Karthauser" at Jun 15, 97 02:09:35 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Can someone please help me? We've got a web machine thta is running out > of processes to the extent the it can't spawn CGI scripts anymore. This > started happening when I upgraded from 2.1.7.1 to 2.2.2. > > The web server runs under the a non-priv user called webboss. We usually > unlimit the number of processes and openfiles in a startup script that > unlimits the shell before firing up 'httpd' (apache). > > I've created a class called 'web' in /etc/login.conf with limits of 1000 > processes and 2000 files (we've got a USERS 128 in the kernel). I've attached > this class to the 'webboss' user in the passwd file. We're still getting > 'out of processes' errors for this user though. When this last happened > a 'ps -aux | grep ^webboss | wc' showed 150 processes running for webboss, > and I couldn't 'su -m weboss' from root. > > Does anybody know how login.conf works? It's not clear to me from the > manual whether it's values act globally, or only for users that have logged > in? login.conf only operates agains users whose credentials were generated through a login process (quotas are assigned at the time credentials are, when using login.conf). > What can I do to fix this problem. It's causing us major problems at > the moment. Most likely, you want to sysctl up "maxprocperuid", followed by "maxproc" in a process before forking the process that forks the server. This is (effectively) what login.conf does when you login. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.