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


因為日志文件老是有這種提示: 

[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 "^$"


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM