php-fpm 收到“失败”消息,但进程已启动——正常吗?

php-fpm 收到“失败”消息,但进程已启动——正常吗?

我遇到一个奇怪的问题,当我启动 php-fpm 时,收到以下消息:

> /etc/init.d/php-fpm start

Starting php-fpm ................................... failed

但当我查看日志文件时,看起来一切都很好(我将输出更改为调试)

Oct 28 21:25:28.434246 [DEBUG] pid 19872, fpm_event_init_main(), line 93: libevent: using epoll
Oct 28 21:25:28.434392 [NOTICE] pid 19872, fpm_init(), line 50: fpm is running, pid 19872
Oct 28 21:25:28.435346 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19873 started
Oct 28 21:25:28.436182 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19874 started
Oct 28 21:25:28.437047 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19875 started
Oct 28 21:25:28.437897 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19876 started
Oct 28 21:25:28.438751 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19877 started
Oct 28 21:25:28.439637 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19878 started
Oct 28 21:25:28.440512 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19880 started
Oct 28 21:25:28.441385 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19881 started
Oct 28 21:25:28.442252 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19882 started
Oct 28 21:25:28.443391 [DEBUG] pid 19872, fpm_children_make(), line 403: [pool www] child 19884 started
Oct 28 21:25:28.443551 [NOTICE] pid 19872, fpm_event_loop(), line 111: ready to handle connections

这些流程存在,而且似乎处理得很好。为什么它会给我一个失败的消息?

答案1

值得一提的是,即使 Daniel 已经解决了自己的问题,但仍修复了在全新安装 PHP-FPM 时遇到的 .....failed 错误问题。

php-fpm.conf 文件有一个 pid 文件指令,在新安装中该指令被注释掉。删除 ';' 以写入 pid 文件,启动命令应该不会在默认位置定位 pid 文件时出现问题。

相关内容