lnmp502问题

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

[www]
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里面有警告 如下:

[04-May-2017 10:43:03] NOTICE: about to trace 28860
[04-May-2017 10:43:03] ERROR: failed to ptrace(PEEKDATA) pid 28860: Input/output error (5)
[04-May-2017 10:43:03] NOTICE: finished trace of 28860
[04-May-2017 10:46:53] WARNING: [pool www] child 28828 exited on signal 11 (SIGSEGV) after 951.056842 seconds from start
[04-May-2017 10:46:53] NOTICE: [pool www] child 29316 started
[04-May-2017 10:46:54] WARNING: [pool www] child 29018 exited on signal 11 (SIGSEGV) after 951.950662 seconds from start
[04-May-2017 10:46:54] NOTICE: [pool www] child 29317 started
[04-May-2017 10:47:10] WARNING: [pool www] child 28843 exited on signal 11 (SIGSEGV) after 967.899263 seconds from start
[04-May-2017 10:47:10] NOTICE: [pool www] child 29321 started
[04-May-2017 10:47:12] WARNING: [pool www] child 29317 exited on signal 11 (SIGSEGV) after 17.078623 seconds from start
[04-May-2017 10:47:12] NOTICE: [pool www] child 29322 started
[04-May-2017 10:47:17] WARNING: [pool www] child 28869 exited on signal 11 (SIGSEGV) after 974.713335 seconds from start
[04-May-2017 10:47:17] NOTICE: [pool www] child 29323 started
[04-May-2017 10:47:40] WARNING: [pool www] child 28932 exited on signal 11 (SIGSEGV) after 997.871340 seconds from start
[04-May-2017 10:47:40] NOTICE: [pool www] child 29331 started
[04-May-2017 10:47:42] WARNING: [pool www] child 28971 exited on signal 11 (SIGSEGV) after 999.124299 seconds from start
[04-May-2017 10:47:42] NOTICE: [pool www] child 29332 started
[04-May-2017 10:48:41] WARNING: [pool www] child 28961 exited on signal 11 (SIGSEGV) after 1058.134399 seconds from start
[04-May-2017 10:48:41] NOTICE: [pool www] child 29347 started
[04-May-2017 10:48:42] WARNING: [pool www] child 28969 exited on signal 11 (SIGSEGV) after 1059.219216 seconds from start
[04-May-2017 10:48:42] NOTICE: [pool www] child 29348 started

不知该如何解决,怎么修改一下配置才能去掉这些警告呢?《南平网友》:建议开慢日志看看,可能是有程序执行慢时间太长超时了

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注