Opened 14 years ago

Closed 14 years ago

#27470 closed defect (fixed)

port unload lighttpd fails to kill all php-cgi children

Reported by: mitch@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: lighttpd php5

Description

port load lighttpd works just fine, however port unload lighttpd seems to leave dangling cgi children keeping automated restarts and whatnot from working properly.

This could be a snow leopard issue, but I need more help determining what is the cause to be sure.

ENVIRONMENT

# port -v
MacPorts 1.9.2

# lighttpd -v
lighttpd/1.4.26 (ssl) - a light and fast webserver
Build-Date: Nov 21 2010 10:58:21

# php -v
PHP 5.3.3 (cli) (built: Nov 16 2010 15:05:08) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

Ultimately this is my experience:

# port load lighttpd
# port unload lighttpd
# ps ax | grep php
 5418   ??  Ss     0:00.01 /opt/local/bin/php-cgi
 5419   ??  S      0:00.00 /opt/local/bin/php-cgi
 5420   ??  Ss     0:00.01 /opt/local/bin/php-cgi
 5421   ??  S      0:00.00 /opt/local/bin/php-cgi
 5422   ??  Ss     0:00.01 /opt/local/bin/php-cgi
 5423   ??  S      0:00.00 /opt/local/bin/php-cgi
 5424   ??  Ss     0:00.01 /opt/local/bin/php-cgi
 5425   ??  S      0:00.05 /opt/local/bin/php-cgi
 5433 s001  R+     0:00.00 grep php

Change History (3)

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Keywords: lighttpd php-cgi php unload removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: php5 added

Please remember to cc the maintainer.

comment:2 in reply to:  1 Changed 14 years ago by mitch@…

Replying to jmr@…:

Please remember to cc the maintainer.

Apologies, didn't see that.

Downloading a new xcode as well, starting to suspect that is the root cause after seeing other strangeness with php and lighttpd.

comment:3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Please update to lighttpd 1.4.28 (just committed in r73869) and make sure your lighttpd.conf says:

server.event-handler = "libev"

The port used to ship config files with the event-handler set by default to "freebsd-kqueue", which was recommended for Tiger, but on Snow Leopard (and maybe Leopard) would cause lighttpd to crash terribly often, and each time it crashed, it would orphan its php-cgi processes. Since switching the event handler to libev, I have not seen this problem anymore.

Note: See TracTickets for help on using tickets.