大网数据广告活动
服务器运维问答

How can I find out why my php5-fpm failed to start?

· 52CE 我爱测

I get 504 gateway timeout when I try to reach my server. A small check didn't find any logs on php5-fpm logs, but just to make sure, I tried to restart it. When I am trying to restart it: sudo service php5-fpm restart I get [fail…

问题原文

原帖链接 · Liad Livnat · CC BY-SA 4.0

I get 504 gateway timeout when I try to reach my server.

A small check didn't find any logs on php5-fpm logs, but just to make sure, I tried to restart it.

When I am trying to restart it:

sudo service php5-fpm restart

I get [fail], but when I do

sudo service php5-fpm stop
sudo service php5-fpm start

I get no error.

How can I investigate it if there are no logs? What can I do?

已采纳解答

原帖链接 · jamzed · CC BY-SA 3.0

Did you check your error_log file for php-fpm? Location of that file should be declared in your php-fpm.conf (in Ubuntu config is /etc/php5/fpm/php-fpm.conf, log file is /var/log/php5-fpm/log), also check your log_level, if is disabled (;log_level), please enable it and change it to the debug. After that try restart php5-fpm service and check your logs.

You can also try to run php5-fpm in foreground mode:

# php5-fpm -y /etc/php5/fpm/php-fpm.conf

Maybe this show you something interesting.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-09-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0 / CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。