ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: nginx-ru@xxxxxxxxx
  • Subject: 502 при работающих сервисах и не нагруженном сервер а
  • From: "iskander" <nginx-forum@xxxxxxxx>
  • Date: Tue, 28 Dec 2010 06:47:20 -0500
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To:Date; bh=5kEyvypHloqqEeTJONtAfdqrv1uc9Cq1AN0Xq7b+Qtk=; b=f65R2ymV9ARfeTEVofxuFavVCp/0/6FPY294JqGOuN3TO3NOpoK1WpoWmvh3gTunOdutYKHyCIme726o9+IvLFzaN8WZgd1EadoMwO17fhxaqUcnRE/B/xMOQmEZtpa4;

В логах постоянно:
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 mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.