简体   繁体   English

php-fpm服务无法完全启动

[英]php-fpm service not starting completly

on my server (FreeBSD 11) the php-fpm service is not srating cleanly anymore. 在我的服务器(FreeBSD 11)上,php-fpm服务不再干净地分级。

# service php-fpm status
php_fpm is not running.

but if i search for running instances i see its working (in fact the web application also uses it and is working: 但是如果我搜索正在运行的实例,我会看到它正在工作(实际上,Web应用程序也使用它并且正在工作:

# top | grep php-fpm
572 root          1  20    0   265M  4688K kqread  0   3:58   0.00% php-fpm
50875 www           1  31    0   273M 22188K accept  1   0:12   0.00% php-fpm
50872 www           1  20    0   271M 20816K accept  1   0:10   0.00% php-fpm
51438 www           1  30    0   269M 15024K accept  1   0:05   0.00% php-fpm

and if I kill it and start it by hand its in fact starting but complaining about not beeing able to start (same output on "service php-fpm restart"): 如果我杀死它并用手启动它,实际上它已经启动了,但抱怨无法启动(“ service php-fpm restart”上的输出相同):

# service php-fpm start
Performing sanity check on php-fpm configuration:
[10-Mar-2017 13:10:54] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/apc.so' - Cannot open "/usr/local/lib/php/20131226/apc.so" in Unknown on line 0
[10-Mar-2017 13:10:54] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
[10-Mar-2017 13:10:54] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20131226/apc.so' - Cannot open "/usr/local/lib/php/20131226/apc.so" in Unknown on line 0
[10-Mar-2017 13:10:54] ERROR: An another FPM instance seems to already listen on /var/run/php5-fpm.sock
[10-Mar-2017 13:10:54] ERROR: FPM initialization failed
/usr/local/etc/rc.d/php-fpm: WARNING: failed to start php_fpm

what could produce this? 会产生什么呢?

Mr.Gosh above gave the correct answer. 上面的戈什先生给出了正确的答案。 The issue is pid file which probably doesn't have declared path/filename in php-fpm.conf like this: 问题是pid文件,可能在php-fpm.conf中没有这样声明路径/文件名:

include=etc/php-fpm.d/*.conf

[global]
pid = run/php-fpm.pid
events.mechanism = kqueue
error_log = /home/user/logs/php-error.log

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM