Welcome! Log In Create A New Profile

Advanced

[nginx] Stream: fixed logging UDP upstream timeout.

Roman Arutyunyan
September 14, 2017 07:26AM
details: http://hg.nginx.org/nginx/rev/0846dd76a487
branches:
changeset: 7105:0846dd76a487
user: Roman Arutyunyan <arut@nginx.com>
date: Tue Sep 12 13:44:04 2017 +0300
description:
Stream: fixed logging UDP upstream timeout.

Previously, when the first UDP response packet was not received from the
proxied server within proxy_timeout, no error message was logged before
switching to the next upstream. Additionally, when one of succeeding response
packets was not received within the timeout, the timeout error had low severity
because it was logged as a client connection error as opposed to upstream
connection error.

diffstat:

src/stream/ngx_stream_proxy_module.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r cdbcb73239ee -r 0846dd76a487 src/stream/ngx_stream_proxy_module.c
--- a/src/stream/ngx_stream_proxy_module.c Wed Sep 13 15:53:19 2017 +0300
+++ b/src/stream/ngx_stream_proxy_module.c Tue Sep 12 13:44:04 2017 +0300
@@ -1331,13 +1331,17 @@ ngx_stream_proxy_process_connection(ngx_
return;
}

+ ngx_connection_error(pc, NGX_ETIMEDOUT, "upstream timed out");
+
if (u->received == 0) {
ngx_stream_proxy_next_upstream(s);
return;
}
+
+ } else {
+ ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
}

- ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
return;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Stream: fixed logging UDP upstream timeout.

Roman Arutyunyan 606 September 14, 2017 07:26AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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