Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream keepalive: clean read delayed flag in stored connections.

Roman Arutyunyan
December 04, 2017 12:36PM
details: http://hg.nginx.org/nginx/rev/1cb92a2d672e
branches:
changeset: 7165:1cb92a2d672e
user: Roman Arutyunyan <arut@nginx.com>
date: Tue Nov 28 14:00:00 2017 +0300
description:
Upstream keepalive: clean read delayed flag in stored connections.

If a connection with the read delayed flag set was stored in the keepalive
cache, and after picking it from the cache a read timer was set on that
connection, this timer was considered a delay timer rather than a socket read
event timer as expected. The latter timeout is usually much longer than the
former, which caused a significant delay in request processing.

The issue manifested itself with proxy_limit_rate and upstream keepalive
enabled and exists since 973ee2276300 (1.7.7) when proxy_limit_rate was
introduced.

diffstat:

src/http/modules/ngx_http_upstream_keepalive_module.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r 044cb349fd3c -r 1cb92a2d672e src/http/modules/ngx_http_upstream_keepalive_module.c
--- a/src/http/modules/ngx_http_upstream_keepalive_module.c Mon Dec 04 17:30:02 2017 +0300
+++ b/src/http/modules/ngx_http_upstream_keepalive_module.c Tue Nov 28 14:00:00 2017 +0300
@@ -340,6 +340,7 @@ ngx_http_upstream_free_keepalive_peer(ng
pc->connection = NULL;

if (c->read->timer_set) {
+ c->read->delayed = 0;
ngx_del_timer(c->read);
}
if (c->write->timer_set) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream keepalive: clean read delayed flag in stored connections.

Roman Arutyunyan 397 December 04, 2017 12:36PM



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

Online Users

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