2012-04-11 35 views
1

當我的服務器收到大量請求PHP-FPM紀錄(PHP5-fpm.log)以下:爲什麼php-fpm警告重生的孩子?

WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 0 idle, and 6 total children 

我的PHP-fpm.conf是:

... 
    pm = dynamic 
    pm.max_children = 50 
    pm.start_servers = 2 
    pm.min_spare_servers = 1 
    pm.max_spare_servers = 3 
    pm.max_requests = 200 
    ... 

回答

1

看來你需要改變你的php-fpm.conf。

pm.start_servers = 2 
pm.min_spare_servers = 1 
pm.max_spare_servers = 3 

作爲PHP-fpm.log所示,[池WWW]似乎busy.There是6名總兒童和PHP-FPM將產生8 more.It意味着沒有足夠的php-fpm的過程。我建議你根據你的服務器性能增加pm.start_servers,pm.min_spare_servers和pm.min_spare_servers。

+3

你有什麼辦法計算這個嗎? 基於內存和處理器的數量... – renedet 2012-04-12 11:04:27