From owner-freebsd-questions Thu Mar 22 12:32:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.unixathome.org (ns1.unixathome.org [203.79.82.27]) by hub.freebsd.org (Postfix) with ESMTP id 0E59637B71F for ; Thu, 22 Mar 2001 12:32:41 -0800 (PST) (envelope-from dan@langille.org) Received: from wocker (dan@wocker.int.nz.freebsd.org [192.168.0.99]) by ns1.unixathome.org (8.11.3/8.11.3) with ESMTP id f2MKWdj93395 for ; Fri, 23 Mar 2001 08:32:40 +1200 (NZST) (envelope-from dan@langille.org) Message-Id: <200103222032.f2MKWdj93395@ns1.unixathome.org> From: "Dan Langille" Organization: novice in training To: freebsd-questions@FreeBSD.ORG Date: Fri, 23 Mar 2001 08:32:39 +1200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Apache processes grind system to a halt Reply-To: dan@langille.org X-mailer: Pegasus Mail for Win32 (v3.12c) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG About 2 or 3 times a day, Apache gets its knickers in a twist. Sometimes it takes the box down with it. If left unchecked, the load averages climb, swap is exhausted, and the system dies. If I keep an eye on the box and kill -TERM the processes, the box is OK. But that is not a solution. I have no idea why Apache does this. The web server is running Apache, php, mysql. This may be a php script out of control, but if it is, I don't know how to find it. The box is running 4.2-stable. Apache, php, and mysql are recent versions (all upgraded yesterday in case that was the problem). Is there a way to determine what a particular httpd process is doing? At least then I could see what task was taking so much time. Here's an example from the top before the latest death. There are other processes but these are the top. last pid: 61399; load averages: 19.49, 19.23, 19.32 up 0+18:03:37 05:30:12 111 processes: 21 running, 90 sleeping CPU states: 75.2% user, 0.1% nice, 10.7% system, 14.0% interrupt, 0.0% idle Mem: 31M Active, 7644K Inact, 17M Wired, 3204K Cache, 14M Buf, 404K Free Swap: 519M Total, 519M Used, 100% Inuse, 24M In, 20M Out PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 58992 www 50 0 45500K 2144K RUN 17:39 3.03% 3.03% httpd 58988 www 50 0 45608K 2132K RUN 18:38 2.88% 2.88% httpd 58979 www 50 0 46004K 2188K RUN 18:09 2.88% 2.88% httpd 59049 www 50 0 44540K 2040K RUN 17:51 2.88% 2.88% httpd 50031 www 50 0 99636K 1860K RUN 64:39 2.83% 2.83% httpd 50651 www 50 0 46984K 2288K RUN 19:22 2.83% 2.83% httpd 59030 www 50 0 44636K 2096K RUN 18:00 2.83% 2.83% httpd 59070 www 50 0 44576K 2044K RUN 17:32 2.83% 2.83% httpd 58986 www 50 0 45004K 2324K RUN 18:07 2.78% 2.78% httpd 58991 www 51 0 44584K 2400K RUN 17:50 2.78% 2.78% httpd 58983 www 50 0 46352K 2164K RUN 19:18 2.64% 2.64% httpd 59031 www 50 0 45092K 2156K RUN 18:14 2.64% 2.64% httpd 50032 www 49 0 47808K 2172K RUN 20:08 2.59% 2.59% httpd 58170 www 49 0 47000K 2328K RUN 19:11 2.59% 2.59% httpd 59058 www 49 0 44444K 2332K RUN 17:41 2.59% 2.59% httpd 59038 www 50 0 44188K 2120K RUN 17:40 2.59% 2.59% httpd 50033 www 50 0 45952K 2152K RUN 18:54 2.54% 2.54% httpd 40876 mysql 48 0 48360K 4240K RUN 23:42 2.29% 2.29% mysqld 61382 www 2 0 8892K 2108K sbwait 0:00 0.42% 0.39% httpd 59225 www 2 0 10276K 2056K sbwait 0:22 0.24% 0.24% httpd -- Dan Langille pgpkey - finger dan@unixathome.org | http://unixathome.org/finger.php got any work? I'm looking for some. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message