歡迎您光臨本站 註冊首頁

Nginx 0.7.65 + PHP(FastCGI)出現許多fpm_children_bury()的日誌

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

Nginx 0.7.65 + PHP(FastCGI)出現許多fpm_children_bury()的日誌

php-fpm.conf里好多這種日誌,我把前面的時間去除了,如下

...
fpm_children_make(), line 352: child 60403 (pool default) started
fpm_got_signal(), line 48: received SIGCHLD
fpm_children_bury(), line 215: child 60202 (pool default) exited with code 0 after 586.995571 seconds from start
fpm_children_make(), line 352: child 60414 (pool default) started
fpm_got_signal(), line 48: received SIGCHLD
fpm_children_bury(), line 215: child 60213 (pool default) exited with code 0 after 585.974364 seconds from start
fpm_children_make(), line 352: child 60417 (pool default) started
fpm_got_signal(), line 48: received SIGCHLD
fpm_children_bury(), line 215: child 60212 (pool default) exited with code 0 after 594.752959 seconds from start
fpm_children_make(), line 352: child 60421 (pool default) started...

這個是什麼導致的?而且php頁面處理得有些慢,個別情況下慢到難以忍受了。。。

部分php-fpm.conf<value name="max_children">64</value>
...
<value name="StartServers">20</value>
<value name="MinSpareServers">5</value>
<value name="MaxSpareServers">35</value>
...
<value name="max_requests">1024</value>部分nginx.confworker_processes 16;
worker_rlimit_nofile 65535;
events
{
  use epoll;
  worker_connections 10240;
}各位用過nginx、php fastcgi(php-fpm)的dx幫分析一下啊,謝謝
《解決方案》

本帖最後由 xuledw 於 2010-03-31 17:27 編輯

PHP processes exits abnormally on SIGSEGV signal.
Probably you need to add

fastcgi_param  REQUEST_METHOD     $request_method;
for example:
   location / {
            root   /var/www/dataup.de;
            index  index.html index.htm;
            rewrite ^/download/(+)/(+)/(.+)$ ./download_it.inc.php?file=$1&time=$2&md5=$3;
            set $file_id $1;
            fastcgi_param  REQUEST_METHOD     $request_method;


<value name="max_requests">1024</value>
這個是不是設置的太小了
《解決方案》

本帖最後由 xuledw 於 2010-03-31 17:37 編輯

php-fpm.conf給的少了 最好給個完整的 大家看看 我個人猜測跟這個有些關係
另外nginx中是否有關於fastcgi的一些設置呢
fastcgi_connect_timeout 300;
  fastcgi_send_timeout 300;
  fastcgi_read_timeout 300;
  fastcgi_buffer_size 64k;
  fastcgi_buffers 4 64k;
  fastcgi_busy_buffers_size 128k;
  fastcgi_temp_file_write_size 128k;
《解決方案》

本帖最後由 xuledw 於 2010-03-31 17:44 編輯

看下你的ulimit估計是不夠用了
# vi /etc/sysctl.conf
底部添加
fs.file-max=65535
#vi /etc/security/limits.conf
加上
* soft nofile 65535
* hard nofile 65535

啟動Nginx
ulimit -SHn 65535
/usr/local/nginx/sbin/nginx

配置開機自動啟動Nginx + PHP
vi /etc/rc.local

  在末尾增加以下內容:
引用
ulimit -SHn 65535
/usr/local/php/sbin/php-fpm start
/usr/local/nginx/sbin/nginx
《解決方案》

回復 2# xuledw


    1024少嗎?有沒有相關參考,謝謝你的熱心 :mrgreen:
《解決方案》

回復 4# xuledw


    我在另一個帖子已回復,不是這個問題,系統打開文件限制已配置
《解決方案》

我也碰到這個問題 最後你是怎麼解決的呢
《解決方案》

1,你可以參照張宴大哥blog裡面的去修改參數
2 根據自己的需要,按照實際情況根據你的物理內存大小,和整個部署環境去修改
3,配合相應的nginx.conf  fastcgi_connect_timeout 320;
                                    fastcgi_send_timeout    320;
                                    fastcgi_read_timeout    320;
                                    fastcgi_buffer_size 64k;
                                    fastcgi_buffers 8 64k;
   僅供參考!

[火星人 ] Nginx 0.7.65 + PHP(FastCGI)出現許多fpm_children_bury()的日誌已經有649次圍觀

http://coctec.com/docs/service/show-post-15139.html