suifeng123 发表于 2017-5-4 11:42:14

lnmp502问题

我是做职业资格考试的;每年的5月份是考试季,用户量比较多,之前没什么毛病;用户量已大就会出现502;经过初步排查是php-fpm不够引起的;
后来修改php-fpm.conf配置文件 如下:

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 = 2048
listen.allowed_clients = 127.0.0.1
listen.owner = www
listen.group = www
listen.mode = 0666
user = www
group = www
pm = static
pm.max_children = 300
pm.start_servers = 20
pm.min_spare_servers = 20
pm.max_spare_servers = 280
pm.max_requests = 1024
request_terminate_timeout = 30
request_slowlog_timeout = 30
slowlog = var/log/slow.log


把php-fpm增加到了300;暂时没事了;为以后防止出现 502的现象 添加了一个定时任务 每隔半小时重启一下 php-fpm reload
到目前为止还没出现过502的现象;
但是在php-fpm.log里面有警告 如下:

NOTICE: about to trace 28860
ERROR: failed to ptrace(PEEKDATA) pid 28860: Input/output error (5)
NOTICE: finished trace of 28860
WARNING: child 28828 exited on signal 11 (SIGSEGV) after 951.056842 seconds from start
NOTICE: child 29316 started
WARNING: child 29018 exited on signal 11 (SIGSEGV) after 951.950662 seconds from start
NOTICE: child 29317 started
WARNING: child 28843 exited on signal 11 (SIGSEGV) after 967.899263 seconds from start
NOTICE: child 29321 started
WARNING: child 29317 exited on signal 11 (SIGSEGV) after 17.078623 seconds from start
NOTICE: child 29322 started
WARNING: child 28869 exited on signal 11 (SIGSEGV) after 974.713335 seconds from start
NOTICE: child 29323 started
WARNING: child 28932 exited on signal 11 (SIGSEGV) after 997.871340 seconds from start
NOTICE: child 29331 started
WARNING: child 28971 exited on signal 11 (SIGSEGV) after 999.124299 seconds from start
NOTICE: child 29332 started
WARNING: child 28961 exited on signal 11 (SIGSEGV) after 1058.134399 seconds from start
NOTICE: child 29347 started
WARNING: child 28969 exited on signal 11 (SIGSEGV) after 1059.219216 seconds from start
NOTICE: child 29348 started


不知该如何解决,怎么修改一下配置才能去掉这些警告呢?

licess 发表于 2017-5-4 13:26:33

建议开慢日志看看,可能是有程序执行慢时间太长超时了

suifeng123 发表于 2017-5-4 16:13:08

还有一个问题

总是有这个警告:
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard
WARNING: failed to acquire scoreboard

licess 发表于 2017-5-4 21:49:26

回复 3# 的帖子

这个错误不清楚
页: [1]
查看完整版本: lnmp502问题