php日誌報錯child exited with code 0 after seconds from start

由於日誌文件總是有這種提示: php

[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 startedphp-fpm

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

[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 startcode

 

緣由就是沒有pm.start_servers這個參數沒有按照下面的這個公式來:server

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

通常min_spare_servers設置爲20it

max_spare_servers是根據服務器自己的內存來計算的,標準算法就是內存大小除以30M

固然,有的php程序可能佔用比較小,不到30M,這就看狀況來計算了。

我設置的是這樣的

過濾註釋部分:

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

相關文章
相關標籤/搜索