php-cgi frozen with sbwait when SMP enable

Ivan Voras ivoras at freebsd.org
Fri Nov 7 04:13:04 PST 2008


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.

You didn't give any information about your environment, specifically
versions of FreeBSD, PHP and lighttpd you use, and in what way you use
PHP (I'm guessing you're using FastCGI).

> 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?

AFAIK sbwait is socket buffer wait, meaning the process is waiting for
some data over a socket (and, in your case, it's not getting it). I'm
using php-cgi in FastCGI mode (with mod_fcgid on Apache) on about a
dozen servers, all SMP, without problems. Some Apaches are
worker-threaded and some use the event MPM. It very much looks like your
problem could be a bug in lighttpd.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20081107/13e71f0f/signature.pgp


More information about the freebsd-stable mailing list