Welcome! Log In Create A New Profile

Advanced

Dead backend detection

November 22, 2011 05:52PM
Добрый вечер

Есть ли возможность (в ралтайме) узнать, что бэкенд был признан помершим
и выкинут из пула и причину?

Слишком часто у меня на фронтэнде проскакивает 502 ошибка:

# cat /var/log/nginx/default_access.log | grep ' HTTP/1.0" 502 ' | wc -l
4498

Например:
207.46.13.98 - - [22/Nov/2011:04:24:57 +0000] "GET
/Companies/go-hongkong-hotels/0270003228578 HTTP/1.1" 502 9603 "-"
"Mozilla/5.0 (compatible; bingbot/2.0;
+http://www.bing.com/bingbot.htm)" "-"

Т.е. была ли проблема с сетью, либо же фронтенд получил 50х ошибку от
быкенда.

Конфиг на фронтенде:

proxy_connect_timeout 5;
proxy_intercept_errors on;

upstream backend {
server 10.1.9.2 max_fails=3 fail_timeout=300s;
server 10.1.9.3 max_fails=3 fail_timeout=300s;
server 127.0.0.1 backup;
ip_hash;
}

server {
location / {
error_page 502 504 /errors/500.html;
return 502;
}
}

server {
listen 80 default;

location / {
proxy_pass http://backend;
proxy_next_upstream error timeout http_502 http_504;

}
...
}

Спасибо.

_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Dead backend detection

sergey.kobzar November 22, 2011 05:52PM

Re: Dead backend detection

Maxim Dounin November 23, 2011 02:56AM

Re: Dead backend detection

sergey.kobzar November 23, 2011 05:00AM

Re: Dead backend detection

Maxim Dounin November 23, 2011 07:54AM

Re: Dead backend detection

sergey.kobzar November 23, 2011 08:12AM

Re: Dead backend detection

sergey.kobzar November 25, 2011 09:38AM

Re: Dead backend detection

Maxim Dounin November 25, 2011 12:08PM

Re: Dead backend detection

sergey.kobzar November 25, 2011 12:58PM

Re: Dead backend detection

sergey.kobzar November 25, 2011 01:02PM

Re: Dead backend detection

sergey.kobzar November 25, 2011 01:08PM

Re: Dead backend detection

sergey.kobzar November 25, 2011 06:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 129
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