From owner-freebsd-stable@FreeBSD.ORG Tue Nov 11 14:16:41 2008 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA8D106567E for ; Tue, 11 Nov 2008 14:16:41 +0000 (UTC) (envelope-from ken73.chen@gmail.com) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.244]) by mx1.freebsd.org (Postfix) with ESMTP id B31868FC17 for ; Tue, 11 Nov 2008 14:16:40 +0000 (UTC) (envelope-from ken73.chen@gmail.com) Received: by hs-out-0708.google.com with SMTP id 54so1248593hsz.11 for ; Tue, 11 Nov 2008 06:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=ZtmCv+RnPw8fOVHNT0+1/ezsIFjxtMu87CRbZkm/MeE=; b=mv4wZPyMaHan8/r+mLSIMMhK1ZsScqFiC+0QYcL6EiSVUcMFKoInnkRmAkUlmuTeZG 1gAiIifx9P/ipqHENZqLTh0ZTc/cx4pB4nuJCPuxC6zFvGfkBiyCTwacUdXpvfb8uu3X 8l6acmTB2WXjYbrTIVF5EpFx6ufkm+99FtYq8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=eosli9kcCek2s0xjrSM3tR7wLAyiFWpL5xxEUn06EQxWDFw+AbYSA+r4UWwMs/gW7m lWvYDhMTZgKzIqccWTYV3IQdoDH21r2zIjVrlLqTAIzG1i4ymc7W3P2NT+eQeII1J+TU SsajQZ8HiQFqc1F6pgjkcYa4YqfRqc8E6ddk0= Received: by 10.142.50.5 with SMTP id x5mr2301144wfx.330.1226412578354; Tue, 11 Nov 2008 06:09:38 -0800 (PST) Received: by 10.142.232.19 with HTTP; Tue, 11 Nov 2008 06:09:38 -0800 (PST) Message-ID: Date: Tue, 11 Nov 2008 22:09:38 +0800 From: "Ken Chen" To: stable@freebsd.org In-Reply-To: <4917285C.2030702@lozenetz.org> MIME-Version: 1.0 References: <20081107142137.GA7051@icarus.home.lan> <4917285C.2030702@lozenetz.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: php-cgi frozen with sbwait when SMP enable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 14:16:41 -0000 I think the parent php-cgi are very health. I have tried: There are total 49 php-cgi processes are running or frozen, the '1 wait' is parent . web4# ps alx | grep php-cgi | grep -v grep | awk '{print $9}' | sort | uniq -c | sort -n 1 biowr 1 wait 15 sbwait 32 accept Kill one of frozen php-cgi processes. web4# kill -9 61392 Check again the amount of php-cgi processes, there are still 49 php-cgi procerss. web4# ps alx | grep php-cgi | grep -v grep | awk '{print $9}' | sort | uniq -c | sort -n 1 biord 1 bo_wwa 1 wait 4 - 17 sbwait 25 accept 2008/11/10 Anton - Valqk > Oh, just saw that, this could be caused by dead parent php-cgi processes > (just a guess). > I used to run lighttpd with span-fcgi executable and it happens very > often to have dead parents (of php-cgi childs) that must be killed by > killall php-cgi (eg. restart _ALL_ php-cgi processes, pretty stupid!!! > but if you have dead parent you can't know which childs to kill)... > If you run your php-cgi processes just from the lighttpd(and lighttpd > manages php-cgi processes) try running it with fcgi-spawn and write a > script to check parents of the php-cgi backends and you'll see if that's > the cause of having 'hang' phps :( > > pls tell me what is it. I'm interested! > > cheers, > valqk. > Ken Chen wrote: > > Hi Jeremy, > > > > A health FastCGI process have a lifetime, so the PIDs of all php-cgi > > processes should in a short range. > > > > There are some 'php-cgi' fall in 'sbwait' state, and stay there forever. > The > > frozen 'php-cgi' can't accept new request, so never retire. > > > > Please forgive my poor English. > > > > 2008/11/7 Jeremy Chadwick > > > > > >> On Fri, Nov 07, 2008 at 07:29:37PM +0800, Ken Chen wrote: > >> > >>> Hello, > >>> > >>> I have 4 web servers with lighttpd to serve one web site with DNS load > >>> sharing. On the 2 SMP-enable web servers, there will be many php-cgi > >>> > >> frozen > >> > >>> in 'sbwait' state every day. It means the php-cgi stay in 'sbwait' > state, > >>> and never be back to 'accept' or other state. If I restart them, there > >>> > >> will > >> > >>> be frozen php-cgi appear some hours later. > >>> > >>> There is no problem on the other single CPU web servers which running > >>> > >> same > >> > >>> php scripts and same configuration and version of PHP. > >>> > >>> Why and any solution? > >>> > >> I'm not understanding what the problem is (and I've seen the output you > >> provided later in the thread). Are you stating the problem is that you > >> see many php-cgi processes? Or are you worried they're not doing > >> anything? Does the website function, lock up, or anything like that? > >> If not, what's the issue? :-) > >> > >> -- > >> | Jeremy Chadwick jdc at parodius.com | > >> | Parodius Networking http://www.parodius.com/ | > >> | UNIX Systems Administrator Mountain View, CA, USA | > >> | Making life hard for others since 1977. PGP: 4BD6C0CB | > >> > >> > >> > > _______________________________________________ > > freebsd-stable@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org > " > > > > > >