comparison src/http/ngx_http_upstream.c @ 7340:70c6b08973a0

Upstream keepalive: keepalive_requests directive. The directive configures maximum number of requests allowed on a connection kept in the cache. Once a connection reaches the number of requests configured, it is no longer saved to the cache. The default is 100. Much like keepalive_requests for client connections, this is mostly a safeguard to make sure connections are closed periodically and the memory allocated from the connection pool is freed.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 10 Aug 2018 21:54:46 +0300
parents 696df3ac27ac
children 15ea84e65d07
comparison
equal deleted inserted replaced
7339:d9029e113a05 7340:70c6b08973a0
1544 1544
1545 /* rc == NGX_OK || rc == NGX_AGAIN || rc == NGX_DONE */ 1545 /* rc == NGX_OK || rc == NGX_AGAIN || rc == NGX_DONE */
1546 1546
1547 c = u->peer.connection; 1547 c = u->peer.connection;
1548 1548
1549 c->requests++;
1550
1549 c->data = r; 1551 c->data = r;
1550 1552
1551 c->write->handler = ngx_http_upstream_handler; 1553 c->write->handler = ngx_http_upstream_handler;
1552 c->read->handler = ngx_http_upstream_handler; 1554 c->read->handler = ngx_http_upstream_handler;
1553 1555