Wention 发表于 2016-2-27 13:18:03

军哥大神,求助:关于php-fpm问题, 动态页面一直出现502

问下,为何非要有php-fpm这个步骤?优化来优化去,还是那个样,真的很蛋疼,来来去去还是502错误

VPS是LINODE,1GRAM 1CPU

现在设置这样

pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

listen = /tmp/php-cgi.sock
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = dynamic
pm.max_children = 16
pm.start_servers = 2
pm.min_spare_servers = 16
pm.max_spare_servers = 16
request_terminate_timeout = 300
request_slowlog_timeout = 20
slowlog = var/log/slow.log

++++++++++++++++++++++++++
PHP-FPM日志:

01-Feb-2016 12:08:25] NOTICE: fpm is running, pid 3427
NOTICE: ready to handle connections
NOTICE: Finishing ...
NOTICE: exiting, bye-bye!
NOTICE: fpm is running, pid 3499
NOTICE: ready to handle connections
NOTICE: Terminating ...
NOTICE: exiting, bye-bye!
NOTICE: fpm is running, pid 2151
NOTICE: ready to handle connections
WARNING: child 2152, script '/home/wwwroot/default/phpmyadmin/import.php' (request: "POST /phpmyadmin/import.php") execution timed out (110.744398 sec), terminating
WARNING: child 2152 exited on signal 15 (SIGTERM) after 233.357944 seconds from start
NOTICE: child 2677 started
NOTICE: Terminating ...
NOTICE: exiting, bye-bye!
NOTICE: fpm is running, pid 2152
NOTICE: ready to handle connections
NOTICE: Terminating ...
NOTICE: exiting, bye-bye!
NOTICE: fpm is running, pid 2151
NOTICE: ready to handle connections
WARNING: seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children
WARNING: seems busy (you may need to increase pm.start_servers, or

[ 本帖最后由 Wention 于 2016-2-27 14:39 编辑 ]

Wention 发表于 2016-2-27 13:53:58

很蛋疼,各位大神,如何解决呢???????????

Wention 发表于 2016-2-27 14:03:17

要么得重启php-fpm要么得重启mysql,也是醉了

[ 本帖最后由 Wention 于 2016-2-27 14:05 编辑 ]

Wention 发表于 2016-2-27 14:34:32

顶上去给大神看下,求大神解救,拜谢

licess 发表于 2016-2-27 14:39:37

只看这个日志,你再phpmyadmin里导入数据时超时了,这个很正常,php都是有超时时间的,如想用这个方法按置顶帖502排查方法修改执行时间

最简单的方法就是mysql命令导入:https://www.vpser.net/manage/mysql-import-export.html

Wention 发表于 2016-2-27 17:05:00

回复 5# 的帖子

但是我不是导入的啊,都用一段时间了啊

licess 发表于 2016-2-27 21:48:11

回复 6# 的帖子

你的php-fpm的日志就那几条

你这慢日志好几万条没法,有具体的502的时段没

Wention 发表于 2016-2-28 01:46:06

回复 7# 的帖子

那我再上传下php-fpm的日志吧,,时间段就是白天动态页面都会502或者打开卡的不要不要的,晚上一过12点就很流畅,早上6点开始就开始了

[ 本帖最后由 Wention 于 2016-2-28 12:17 编辑 ]

licess 发表于 2016-2-28 19:47:12

M() /home/wwwroot/zuixia.net/Runtime/~app.php:1
ff_mysql_vod() /home/wwwroot/zuixia.net/Runtime/Cache/Home/2aa95f0cefeeed9fd81e722ce7ab4fe8.php:92

大部分都是提示这个,找这个两个文件,排查提示的函数看看

Wention 发表于 2016-2-29 19:06:52

回复 9# 的帖子

问题解决了一半了,主要是我开了百度云的CDN,所以导致后台和动态文件被缓存,现在用360CDN好多了,不过采集和后台生成的话,就会卡死502
页: [1]
查看完整版本: 军哥大神,求助:关于php-fpm问题, 动态页面一直出现502