有沒有可以幫助我的Nginx/FastCGI大師?Nginx/FastCGI一直在崩潰
我在Debian Squeeze服務Mono FastCGI(fastcgi-mono-server4 2.10.2.0)上運行nginx 1.0.11。我注意到FastCGI實例頻繁響應超過〜350,000字節的POST請求而崩潰。雖然這個級別的一些請求是成功的,但它們更有可能因爲流量增加而失敗。此外,通常當FastCGI實例失敗時,Nginx工作進程將被zombified(即Nginx仍處理請求但超時 - 儘管所有網關都可能關閉,但不返回502)。我開啓了Nginx調試功能,並在工作進程和FastCGI實例崩潰之前發現了以下內容。
2012/01/11 20:38:42 [debug] 1744#0: *141 writev: 8
2012/01/11 20:38:42 [debug] 1744#0: *141 sendfile: @360448 32768
2012/01/11 20:38:42 [debug] 1744#0: *141 sendfile: 32768, @360448 32768:32768
2012/01/11 20:38:42 [debug] 1744#0: *141 writev: 8
2012/01/11 20:38:42 [debug] 1744#0: *141 sendfile: @393216 12167
2012/01/11 20:38:42 [debug] 1744#0: *141 sendfile: 12167, @393216 12167:12167
2012/01/11 20:38:42 [debug] 1744#0: *141 writev: 9
2012/01/11 20:38:42 [debug] 1744#0: *141 chain writer out: 0000000000000000
2012/01/11 20:38:42 [debug] 1744#0: *141 event timer del: 16: 1326314382071
2012/01/11 20:38:42 [debug] 1744#0: *141 event timer add: 16: 60000:1326314382072
這些只是最近登錄的10個項目,但是,如果您希望看到更多,我當然可以發佈或PM。最後,這裏是我的Nginx配置文件。
user www-data;
worker_processes 2;
worker_rlimit_nofile 8192;
events {
worker_connections 2048;
use epoll;
}
http {
error_log /var/log/error.log;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js font/opentype application/font-woff;
gzip_buffers 16 8k;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
upstream backend {
server 127.0.0.1:8080;
server 127.0.0.1:8081;
}
server {
listen 80;
server_name my_server;
root /var/www;
access_log /var/log/host.access.log;
location/{
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
fastcgi_pass backend;
fastcgi_next_upstream http_500 http_404 error timeout;
fastcgi_read_timeout 60;
}
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ {
root /var/www;
}
}
}
錯誤日誌報告,我的工作進程對信號9退出是任何人都熟悉信號9?這意味着什麼? – rposky 2012-01-18 00:05:40