php日志报错child exited with code 0 after seconds from start

因为之前发生502了,日志提示

[27-May-2015 13:54:34] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 16 idle, and 602 total children

然后我就自己随意增加了pm.start_servers参数,一段时间后,php日志/usr/local/php/var/log/php-fpm.log部分信息如下:

[27-May-2015 15:13:48] NOTICE: [pool www] child 3998 started

[27-May-2015 15:13:59] NOTICE: [pool www] child 9242 exited with code 0 after 47575.960999 seconds from start

[27-May-2015 15:13:59] NOTICE: [pool www] child 4210 started

[27-May-2015 15:14:42] NOTICE: [pool www] child 9217 exited with code 0 after 47619.884065 seconds from start

[27-May-2015 15:14:42] NOTICE: [pool www] child 5621 started

[27-May-2015 15:14:43] NOTICE: [pool www] child 9561 exited with code 0 after 47620.024499 seconds from start

原因就是没有pm.start_servers这个参数没有按照下面的这个公式来:

pm.start_servers= min_spare_servers + (max_spare_servers - min_spare_servers) / 2

一般min_spare_servers设置为20

max_spare_servers是根据服务器本身的内存来计算的,标准算法就是内存大小除以30M

当然,有的php程序可能占用比较小,不到30M,这就看情况来计算了。

我设置的是这样的

过滤注释部分:

cat /usr/local/php/etc/php-fpm.conf | grep -v "^;" | grep -v "^$"

[global]

pid = run/php-fpm.pid

error_log = log/php-fpm.log

emergency_restart_threshold = 10

emergency_restart_interval = 1m

process_control_timeout = 10s

rlimit_files = 65535

events.mechanism = epoll

[www]

user = www

group = www

listen = 127.0.0.1:9000

pm = dynamic

pm.max_children = 1400

pm.start_servers = 710

pm.min_spare_servers = 20

pm.max_spare_servers = 1400

pm.max_requests = 10000

slowlog = log/$pool.log.slow

然后重新加载下
/usr/local/nginx/sbin/nginx -s reload

之后几天日志没有出现信息了。

时间: 2024-12-07 05:49:58

php日志报错child exited with code 0 after seconds from start的相关文章

Linux 日志报错 xxx blocked for more than 120 seconds

监控作业发现一台服务器(Red Hat Enterprise Linux Server release 5.7)从凌晨1:32开始,有一小段时间无法响应,数据库也连接不上,后面又正常了.早上检查了监听日志,并没有发现错误信息.但是检查告警日志,发现有下面错误信息: Thread 1 advanced to log sequence 19749 (LGWR switch)   Current log# 2 seq# 19749 mem# 0: /u01/oradata/epps/redo02.lo

11gR2数据库日志报错:Fatal NI connect error 12170、

11gR2数据库日志报错:Fatal NI connect error 12170.TNS-12535.TNS-00505 [问题点数:100分,结帖人MarkIII] 不显示删除回复             显示所有回复             显示星级回复             显示得分回复             只显示楼主           收藏 关注 MarkIII MarkIII 等级: 结帖率:98.94% 楼主发表于: 2011-05-13 10:33:10 Fatal NI

数据库日志报错问题分析

Thread 1 cannot allocate new log, sequence 466 Private strand flush not complete Current log# 7 seq# 465 mem# 0: /home/app/oracle/oradata/orcl/redo07.log Thread 1 advanced to log sequence 466 (LGWR switch) Current log# 8 seq# 466 mem# 0: /home/app/or

记一次rsync日志报错directory has vanished

中午两点的时候邮件告知rsync同部svn源库失败,看rsync日志报错显示如上,当时还在上课,没在公司,怀疑是不是有人动了svn的版本库,后来询问同事并通过vpn登录服务器上查看版本库是正常的,也没有同事反应svn有问题,后来看邮件通知都是正常的,后来查资料说是在同步的过程中,正好有人执行了删除文件的操作,要不要这么巧,不知道是不是这个原因,有知道的小伙伴请联系我:528634141,资料显示如下: Can you ensure, that there is no traffic on the

message日志报错:TCP: time wait bucket table overflow,K哥

2015.9.13 message日志报错:TCP: time wait bucket table overflow 网上很多解决办法,我也是百度的,哈哈 先盗一张图,因为问题已经很久了,没截图 K哥盗图. 这个报错需要更改net.ipv4.tcp_max_tw_buckets这个内核参数. 这个参数是系统同时保持timewait套接字的最大数量. 如果超过这个数字,time-wait套接字将立刻被清除并打印警告信息. 这个限制仅仅是为了防止简单的 DoS攻击. 解决方法: 增大 tcp_max

http报错之return error code:401 unauthorized

 根据HTTP返回码所表示的意思应该是未授权,没有输入账号和密码,因此解决方法就直接在HTTP包里面携带密码. 先利用shell产生user and password 的base64编码 将账号为admin,密码为admin的信息经base64编码为YWRtaW46YWRtaW4=. $ echo -n admin:admin | base64 YWRtaW46YWRtaW4= 同样也可以利用产生的结果去验证是不是账号为admin,密码为admin. $ echo -n YWRtaW46YW

nginx error日志报错

经过与开发的不断协作,终于差不多把error日志的报错信息消灭的差不多了,但还是偶尔出现"*1939 an upstream response is buffered to a temporary file /var/cache/nginx/proxy_temp/2/00/0000000002 while reading upstream, client: 116.231.88.XX, server: _, request: "GET /time HTTP/1.1", ups

SQL Tuning Advisor报错ORA-00600: internal error code, arguments: [kesqsMakeBindValue:obj]

执行SELECT dbms_sqltune.report_tuning_task(:tuning_task) FROM dual;  报错信息如下: ORA-00600: internal error code, arguments: [kesqsMakeBindValue:obj], [], [], [], [], [], [], [] ORA-06512: at "SYS.PRVT_ADVISOR", line 1624 ORA-06512: at "SYS.DBMS_A

linux 日志报错:error (unexpected RCODE REFUSED) resolving '

今天在机子上查看日志,偶然间发现了一堆错误.因为之前配置过DNS 和 squid,报错,之后查错,某度了一下,没找到答案. 下面是一点错误信息: Aug  8 11:40:30 host named[1668]: error (unexpected RCODE REFUSED) resolving '208.22.200.65.in-addr.arpa/PTR/IN': 74.115.231.45#53Aug  8 11:40:30 host named[1668]: error (unexpe