From owner-freebsd-questions@FreeBSD.ORG Thu Dec 9 14:05:43 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 618AA106566C for ; Thu, 9 Dec 2010 14:05:43 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 171368FC21 for ; Thu, 9 Dec 2010 14:05:43 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PQh7s-0002Eh-8l for freebsd-questions@freebsd.org; Thu, 09 Dec 2010 15:05:40 +0100 Received: from pool-173-79-85-36.washdc.fios.verizon.net ([173.79.85.36]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Dec 2010 15:05:40 +0100 Received: from nightrecon by pool-173-79-85-36.washdc.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Dec 2010 15:05:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Followup-To: gmane.os.freebsd.questions Date: Thu, 09 Dec 2010 09:05:54 -0500 Lines: 32 Message-ID: References: <4D00BDF8.6020206@shopzeus.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: pool-173-79-85-36.washdc.fios.verizon.net Subject: Re: What is loading my server so much? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2010 14:05:43 -0000 Laszlo Nagy wrote: > System is FreeBSD shopzeus.com 8.1-STABLE FreeBSD 8.1-STABLE #0: Sun Oct > 31 02:55:28 EDT 2010 amd64 > It has two quad-core Xeon CPUs, 24GB memory, and a RAID 1+0 array with > 10 disks + Areca 1680 controller with 2GB write back cache. > > Server is running: mailscanner + apache multihost + PHP + postgresql. > Main load on the server is usually postgresql. > > Today something happened. Number of http processes went up to 200. As a > result, number of connections to database also went up to 200, and the > web server is now refusing clients with "Cannot connect to database" > messages (coming from PHP). > > This is a typical output from top: > > last pid: 12789; load averages: 7.77, 10.77, > 13.46 > up 26+03:00:30 06:22:04 > 6637 processes: 7 running, 623 sleeping, 7 zombie [snip] ^^^^^^^^^^^^^^^^^^^ First curiosity I would have is these 7 zombies. Which processes are they and how did they get into that state? Might give you a thread to pull on for unraveling. Also, there is some degree of discrepancy present wrt to 6 thousand processes with only 7 running and 623 asleep. I suspect this is just top not getting it right. But it also looks like a forkbomb. -Mike