Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Master процесс nginx 0.6.38 съедает в сю доступную память
- To: nginx-ru@xxxxxxxxx
- Subject: Master процесс nginx 0.6.38 съедает в сю доступную память
- From: Одинцов Павел <pavel.odintsov@xxxxxxxxxxxxxx>
- Date: Tue, 8 Sep 2009 01:18:21 +0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=fkJuVU/8Vr7wuf7UI/SJEurhgLXFXe90vwE8Ikb9AYQ=; b=sy7XFvSeo7Cpotg7DhwZ648oSuWbrij3mGsdchr8p2MAsDALlRV7xJe3kPmlBXZSXp z8KO/vXolDUwFJ8i7GMv1yn5EravL5LrktSlod1m79XFyoptYqiV8W5BJsC+h5GlrC0a 7vJEH/jF3Ix4irXY6IOYnGxFoTQpX9SK4LdnE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=XAV4Q98rLO1e0um/9bIPAHePV4VhmB5uBBcGm4x0aiTcHhzZYHQ9CGQdZrPahXwinG UYBLpeHCLCI6eBZecGpT/yWEIM5vdvotFd63+fTUHv6wdckwPYKfj8+5cOh3SU0hGGBv Nb0e2mBPK+9GGh3XzT2XpvUErGXSXHFj+r72E=
Добрый вечер
Имеется очень противная проблема, nginx 0.6.38 (epel репозиторий)
стоит проксей перед хостинговой Апачей и попутно раздает статику;
изредка на паре машин из полутора десятков nginx (master процесс)
начинает жутко поедать память и в итоге через пару минут сваливает
машину. Подозрения о причинах такого поведения есть в сторону буферов
и проксирования больших файлов от Апача, но тут ничего толком не
получилось понять. Помогайте :(
Вот вывод top в этот момент:
top - 11:38:50 up 23:26, 1 user, load average: 53.15, 50.24, 24.40
Tasks: 130 total, 3 running, 120 sleeping, 0 stopped, 7 zombie
Cpu(s): 0.0%us, 0.2%sy, 0.0%ni, 67.3%id, 32.5%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 10240000k total, 5919988k used, 4320012k free, 12036k buffers
Swap: 4194296k total, 3842072k used, 352224k free, 128848k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1731 root 18 0 10.6g 4.6g 892 R 0.3 47.4 6:34.06 nginx
Конфиг:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 10024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
proxy_buffers 8 16k;
proxy_buffer_size 32k;
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
client_max_body_size 16m;
server_names_hash_bucket_size 64;
server {
listen xx.xx.xx.xx:80;
server_name server6.hostname.ru;
location / {
proxy_pass http://xx.xxx.xx.xx:8080;
proxy_redirect http://server6.hostname.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location @fallback {
proxy_pass http://xx.xxx.xx.xxx:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
Конфигурация:
uname -a
Linux server6.hostname.ru 2.6.18-128.1.10.el5xen #1 SMP Thu May 7
11:07:18 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
CentOS release 5.3 (Final)
/usr/sbin/nginx -V
nginx version: nginx/0.6.38
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: --user=nginx --group=nginx
--prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/lib/nginx/tmp/client_body
--http-proxy-temp-path=/var/lib/nginx/tmp/proxy
--http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
--pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx
--with-http_ssl_module --with-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_flv_module
--with-http_gzip_static_module --with-http_stub_status_module
--with-http_perl_module --with-mail --with-mail_ssl_module
--with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic'
--add-module=/builddir/build/BUILD/nginx-0.6.38/nginx-upstream-fair
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
stepping : 10
cpu MHz : 2500.082
cache size : 6144 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush dts
acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant_tsc pni monitor
ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips : 6254.34
clflush size : 64
cache_alignment : 64
address sizes : 38 bits physical, 48 bits virtual
power management:
--
С уважением, Одинцов Павел
|