mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Upstream: report to error_log when max_fails is reached.
This can be useful to understand why "no live upstreams" happens, in particular.
This commit is contained in:
parent
f7f1607bf2
commit
941a6995d7
@ -622,6 +622,11 @@ ngx_http_upstream_free_round_robin_peer(ngx_peer_connection_t *pc, void *data,
|
||||
|
||||
if (peer->max_fails) {
|
||||
peer->effective_weight -= peer->weight / peer->max_fails;
|
||||
|
||||
if (peer->fails >= peer->max_fails) {
|
||||
ngx_log_error(NGX_LOG_WARN, pc->log, 0,
|
||||
"upstream server temporarily disabled");
|
||||
}
|
||||
}
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, pc->log, 0,
|
||||
|
@ -495,6 +495,11 @@ ngx_stream_upstream_free_round_robin_peer(ngx_peer_connection_t *pc, void *data,
|
||||
|
||||
if (peer->max_fails) {
|
||||
peer->effective_weight -= peer->weight / peer->max_fails;
|
||||
|
||||
if (peer->fails >= peer->max_fails) {
|
||||
ngx_log_error(NGX_LOG_WARN, pc->log, 0,
|
||||
"upstream server temporarily disabled");
|
||||
}
|
||||
}
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_STREAM, pc->log, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user