502 при работающих сервисах и не нагруженном сервера

iskander nginx-forum на nginx.us
Вт Дек 28 14:47:20 MSK 2010


В логах постоянно:
upstream timed out (110: Connection timed out) while reading response
header from upstream
и
connect() failed (110: Connection timed out) while connecting to
upstream

Что делать?
nginx.conf:

worker_process 4;
worker_limit_nofile 16384;

events {
worker_connections 2048;
}

http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 30;
directio 10m;
expires max;
proxy_buffers 8 32k;
proxy_buffer_size 64k;
client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
proxy_connect_timeout 1m;
proxy_send_timeout 1m;
proxy_read_timeout 1m;
gzip on;
}

Уже по всякому игрался с настройками -
пофиг  чаще всего происходит при POST. но
бывает и на GET

httpd.conf

Timeout 60

KeepAlive On

MaxKeepAliveRequests 200

KeepAliveTimeout 15


StartServers 16
MinSpareServers 10
MaxSpareServers 64
ServerLimit 512
MaxClients 512
MaxRequestsPerChild 1000



StartServers 16
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75 
ThreadsPerChild 100
MaxRequestsPerChild 1000


Listen 8080


Не справляться нечему, нагрузка на
сервер маленькая ( 2000-3000 хостов в сутки
)


# top
top - 14:12:39 up 15 days, 3:13, 1 user, load average: 0.50, 0.45, 0.45
Tasks: 153 total, 1 running, 152 sleeping, 0 stopped, 0 zombie
Cpu0 : 1.9%us, 0.4%sy, 0.0%ni, 97.3%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 : 1.9%us, 0.4%sy, 0.0%ni, 97.3%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 : 2.2%us, 0.5%sy, 0.0%ni, 97.2%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 : 2.2%us, 0.5%sy, 0.0%ni, 97.2%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3613708k total, 3324976k used, 288732k free, 266244k buffers
Swap: 4194300k total, 9444k used, 4184856k free, 2758048k cached

Posted at Nginx Forum: http://forum.nginx.org/read.php?21,161682,161682#msg-161682




Подробная информация о списке рассылки nginx-ru