Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP-FPM can't be closed

Tags:

fpm

  501 25131     1   0  9:31下午 ??         0:00.37 /usr/local/opt/php/sbin/php-fpm --nodaemonize
  501 25136 25131   0  9:31下午 ??         0:00.00 /usr/local/opt/php/sbin/php-fpm --nodaemonize
  501 25137 25131   0  9:31下午 ??         0:00.00 /usr/local/opt/php/sbin/php-fpm --nodaemonize
  501 26377 26220   0 10:32下午 ttys000    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn php-fpm

I modified php-fpm.conf daemonize = no, when restart php-fpm by

kill -USR2 'cat /usr/local/var/run/php-fpm.pid' 

and then I find I can't close php-fpm by

kill -9 25131

I can see fpm restart automatically through the error log:

[26-Sep-2018 23:13:43] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[26-Sep-2018 23:13:43] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
[26-Sep-2018 23:13:43] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[26-Sep-2018 23:13:43] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
[26-Sep-2018 23:13:43] NOTICE: fpm is running, pid 26948
[26-Sep-2018 23:13:43] NOTICE: ready to handle connections

It will restart with a new PID, I find no master process and dont know what does --nodaemonize mean.

This problem happened on my macbook just now.

like image 435
Donne Avatar asked Jan 29 '26 13:01

Donne


1 Answers

In the dir ~/Library/LaunchAgents find this file homebrew.mxcl.php.plist.

Delete it and restart my mac, the problem was resolved.

like image 199
Donne Avatar answered Jan 31 '26 08:01

Donne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!