Ticket #737 (new enhancement)

Opened 2 years ago

Last modified 2 months ago

php fcgi does not restart if lighttpd restarts

Reported by: Michael Owned by: jan
Priority: high Milestone:
Component: mod_fastcgi Version: 1.4.16
Severity: major Keywords: php-cgi process zombie restart
Cc: Blocked By:
Need User Feedback: no Blocking:

Description

While using lighttpd on a centos 4.3 installation with kernel 2.6.16.1 (no tweaks to teh kernel). Everytime I made adjustments to php I had to killall php processes in order to restart the php processes to get those updates. Even thought I went and killed all of the php processes I had to restart twice in order to get the php processes started again.

Attachments

Change History

  Changed 2 years ago by Scott

I think this is an issue with php-cgi spawn from lighttpd. When lighttpd restarts, the old lighttpd shuts down the port it listens to so the new process can bind to it. However the old php-cgi parent still binds to the same port (1026 for example), which the new php-cgi cannot bind, that leads to failure to start.

My solution is to use spawn-fcgi even in localhost so you can manage your PHP FastCGI and lighttpd processes independently.

See http://hostingfu.com/article/use-spawn-fcgi-for-lighttpd-php-fastcgi

  Changed 13 months ago by Olaf van der Spek

If you killed all PHP procecsses, the PHP port should be free.

  Changed 9 months ago by Yvan

  • keywords php-cgi process zombie restart added
  • priority changed from normal to high
  • version changed from 1.4.11 to 1.4.16
  • pending unset

Same problem here for 1.4.16 (Debian backport). From time to time, php-cgi processes are not linked to lighttpd, so when a restart is initiated, php doesn't suppress its children, and no php process is created again. I must point out the fact that when running php from within a php script (using system('php-cgi ...') or system('/a/php/file/with/good/headers.php')) the process goes directly to a zombie one and stop working at all. I couldn't manage to make it work correctly so far...

  Changed 9 months ago by Olaf van der Spek

Same problem here for 1.4.16 (Debian backport).

Can you try 1.4.18?

I must point out the fact that when running php from within a php script (using system('php-cgi ...') or system('/a/php/file/with/good/headers.php'))

Shouldn't you use php-cli? Running it that way is not CGI.

follow-up: ↓ 6   Changed 6 months ago by masryalex@…

Same here lighttpd-1.4.18 CentOS 5.1 PHP 5.2.5 even killall php-cgi does nothing and it keeps holding memory, only restarting the server would solve the problem.

in reply to: ↑ 5   Changed 2 months ago by anonymous

  • type changed from defect to enhancement

Replying to masryalex@gmail.com:

Same here lighttpd-1.4.18 CentOS 5.1 PHP 5.2.5 even killall php-cgi does nothing and it keeps holding memory, only restarting the server would solve the problem.

try killall -HUP php-cgi

Add/Change #737 (php fcgi does not restart if lighttpd restarts)

Author



Change Properties
<Author field>
Action
as new
 
Note: See TracTickets for help on using tickets.