Welcome! Log In Create A New Profile

Advanced

Re: fail_timeout - обсудим ?

Maxim Dounin
October 17, 2018 09:26AM
Hello!

On Wed, Oct 17, 2018 at 05:12:31PM +0500, Илья Шипицин wrote:

> привет!
>
> беру стоковый 1.15.5
> вот такой конфиг
>
> upstream root-upstream {
> server 127.0.0.1:999 fail_timeout=30000ms;
> }
>
>
> server {
> listen 80;
> server_name localhost;
>
> location / {
> proxy_pass http://root-upstream;
> }
>
> }
>
> и, собственно, вот
>
> [root@localhost]# nginx -t
> nginx: [emerg] invalid parameter "fail_timeout=30000ms" in
> /etc/nginx/conf.d/default.conf:2
> nginx: configuration file /etc/nginx/nginx.conf test failed
> [root@localhost]#
>
> в документации сказано, что так можно

Параметр fail_timeout принимает время в секундах, поэтому так нельзя.

У меня валяется старый патч, меняющий таймауты на миллисекундные,
но в нём есть вот такой комментарий:

There is a problem: if an error happens and peer->fails (failed,
checked) are set in ngx_http_upstream_free_round_robin_peer(), we
are not guaranteed to see the peer again in a reasonable time. If
more than 24 days passes, the "now - peer->checked <= peer->fail_timeout"
check in ngx_http_upstream_get_peer() will be incorrect on 32-bit
platforms.

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

fail_timeout - обсудим ?

Илья Шипицин October 17, 2018 08:14AM

Re: fail_timeout - обсудим ?

Maxim Dounin October 17, 2018 09:26AM

Re: fail_timeout - обсудим ?

Илья Шипицин October 17, 2018 10:48AM

Re: fail_timeout - обсудим ?

Maxim Dounin October 17, 2018 12:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 280
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready