Welcome! Log In Create A New Profile

Advanced

Большое количество waiting

January 18, 2011 08:30AM
Здравствуйте.
Ситуация схожая с темой http://forum.nginx.org/read.php?21,137710,137710#msg-137710
Однако, проявляется только с 8-й ветки.
Долго не мог понять в чём, собственно, дело. Waiting растут как на дрожжах. Где-то на миллион каждую неделю.
Больше двух миллионов не было, так как на всякий случай рестартил nginx. Релоад не помогает.
На быстродействие, вроде, не влияет. В кору не падает. Иногда сегфолт, но редко. Я вообще заметил только по странному графику какти :)
На ветке 0.9 та же фигня.
До сегодняшнего дня грешил на свои скрипты, ну может что там напортачил. Однако, накатив с утра интереса ради 0.7.68, увидел, что все грабли тут же исчезли. Уже 5 часов всё в пределах 1000 коннектов и количество не растёт.
Возможно, не все директивы конфига правильно понимаются старшими ветками, либо я что-то натупил с конфигом. Но всё ж таки хочется понять в чём дело.


Апача нет, всё через php-fpm.
Там два пула. Один на 9000 порту, второй на 9001. Отличаются только register_globals.

Конфиги.
------------------------------------------
nginx -V
nginx version: nginx/0.7.68
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access_log --error-log-path=/var/log/nginx/error_log --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/tmp/nginx/client --http-proxy-temp-path=/var/tmp/nginx/proxy --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi --with-md5-asm --with-md5=/usr/include --with-sha1-asm --with-sha1=/usr/include --with-poll_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_random_index_module --with-http_secure_link_module --with-http_gzip_static_module --add-module=/usr/src/web/masterzen-nginx-upload-progress-module-2bf172d
-----------------------------------------


cat /etc/nginx/nginx.conf
user nginx hosting;
worker_processes 16;
worker_rlimit_nofile 16384;
worker_priority 5;

worker_rlimit_core 500M;
working_directory /var/log/nginx/cores/;

error_log /var/log/nginx/default/error_log info;
pid /var/run/nginx.pid;

events {
worker_connections 8192;
}

http {
include mime.types;
default_type application/octet-stream;

log_format download
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$http_range" "$sent_http_content_range"';

log_format main
'$remote_addr $host - [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_host" $request_time '
'"$http_x_forwarded_for" "$http_via" "$gzip_ratio"';

access_log /var/log/nginx/default/access_log main;


client_max_body_size 20M;
client_header_timeout 60;
client_body_timeout 60;
large_client_header_buffers 16 16K;

send_timeout 120;

proxy_read_timeout 180;
proxy_connect_timeout 60;
proxy_send_timeout 180;
proxy_buffer_size 64k;
proxy_buffers 64 512k;
proxy_busy_buffers_size 1024k;

msie_padding on;

gzip on;
gzip_min_length 1024;
gzip_buffers 32 64k;
gzip_types application/x-javascript text/css text/xml text/plain;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
output_buffers 32 256k;
postpone_output 1460;

reset_timedout_connection on;

keepalive_timeout 30;

server_names_hash_max_size 1024;
server_names_hash_bucket_size 512;

merge_slashes on;

upload_progress upload_zone_dc 1M;
upload_progress upload_zone_secure_overhit 1M;

server {
listen 127.0.0.1;
server_name localhost;
access_log off;
location ^~ /stub_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
location / { deny all; }
}

server {
listen xxx.xxx.xxx.xxx default;
server_name _;
access_log /var/log/nginx/default/access_log main;
root /usr/html;
index index.html;
}

include /etc/nginx/sites-enabled/*;

}
-------------------------------------------------------------------
Типичный сервер из sites-enabled

cat xxxxxxx.ru
server {
listen xxx.xxx.xxx.xxx:80;
server_name xxxxxxx.ru;
charset utf-8;
access_log /var/log/nginx/xxxxxxx.ru/access_log;
error_log /var/log/nginx/xxxxxxx.ru/error_log;
root /.1/xxxxxxx;
index m.php main.php index.html index.htm index.php;
location ~* /\. { deny all;}
location ~ \.php$ {
fastcgi_pass localhost:9001;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /.1/xxxxxxx$fastcgi_script_name;
fastcgi_intercept_errors on;
include /etc/nginx/fastcgi_params;
}


location ^~ /Inc {
auth_basic "xxxxxxx.ru staff";
index tools.php;
auth_basic_user_file /.1/xxxxxxx/admin/.accesslist;
location ~* /\. { deny all;}

}
}


server {
listen xxx.xxx.xxx.xxx:80;
server_name static.xxxxxxx.ru;
charset UTF-8;
root /.1/xxxxxxx/Static;
index main.php index.html index.htm index.php;
location ~* /\. { deny all;}
location ~* \.(ico|css|js|gif|jpe?g|png)$ {
expires 1w;
add_header Cache-Control public;
}
}

-----------------------------------------------------------------

cat fastcgi.conf

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;

fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

------------------------------------------------------------------------------
Subject Author Posted

Большое количество waiting

Skom January 18, 2011 08:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 220
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready