Welcome! Log In Create A New Profile

Advanced

nginx 0.6.39/php-5.2.5 FastCGI: периодически выпадает 502 Bad Gateway

October 15, 2009 07:20AM
Доброго времени суток!

Связка на CentOS - 2.6.18-92.1.22.el5PAE

Конфиг сервера

user nginx;
worker_processes 4;
worker_rlimit_nofile 10000;

error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;

events {
use epoll;
worker_connections 1024;
}

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

access_log /var/log/nginx/access.log;

sendfile on;
tcp_nopush on;

keepalive_timeout 60;

tcp_nodelay on;

gzip on;
gzip_min_length 1000;
gzip_buffers 16 8k;
gzip_comp_level 1;
gzip_proxied any;
gzip_http_version 1.0;
gzip_types text/plain text/html text/xhtml text/css text/js;
gzip_vary on;

include vhosts.d/*;

}

Пускалка php-cgi
/usr/bin/spawn-fcgi -P /data/www/fcgi/sock_fcgi.pid -s /tmp/.fcgi/fcgi.sock -C 4 -u vuser -f /usr/bin/php-cgi

Лог ошибок заполнен сообщениями

2009/10/12 15:14:33 [error] 16723#0: *5853 readv() failed (104: Connection reset by peer) while reading upstream

При 502 такая ошибка
2009/10/12 16:02:30 [error] 18307#0: *161275 recv() failed (104: Connection reset by peer) while reading response header from upstream

Нагрузка небольшая. Bad Gateway возникает примерно раз за 2-4 часа. Пробовал повесить FastCGI на localhost, от проблемы не избавило. Интересно то, что бекенд живет, хотя nginx и возвращает 502. Лечится все перезапуском бекенда.
Посоветуйте где копать.
Subject Author Posted

nginx 0.6.39/php-5.2.5 FastCGI: периодически выпадает 502 Bad Gateway

dannym October 15, 2009 07:20AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Executier Godlike October 15, 2009 08:06AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

dannym October 15, 2009 09:14AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Executier Godlike October 15, 2009 09:38AM

Re[2]: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Denis F. Latypoff October 15, 2009 09:56AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Executier Godlike October 15, 2009 11:04AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Шестопалов Сергей October 17, 2009 09:06AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

milordk September 12, 2010 03:04AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

dannym October 15, 2009 10:46AM

Re: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Olexander Shtepa October 15, 2009 11:30AM

Re[2]: nginx 0.6.39/php-5.2.5 FastCGI: ________________________ ________________ 502 Bad Gateway

Sergey Bondari October 15, 2009 09:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 185
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready