Mercurial > hg > nginx
comparison src/stream/ngx_stream_upstream_round_robin.c @ 6154:cca856715722
Upstream: report to error_log when max_fails is reached.
This can be useful to understand why "no live upstreams" happens,
in particular.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 20 May 2015 22:44:00 +0300 |
parents | 61d7ae76647d |
children | 2cd019520210 |
comparison
equal
deleted
inserted
replaced
6153:4f6efabcb09b | 6154:cca856715722 |
---|---|
493 peer->accessed = now; | 493 peer->accessed = now; |
494 peer->checked = now; | 494 peer->checked = now; |
495 | 495 |
496 if (peer->max_fails) { | 496 if (peer->max_fails) { |
497 peer->effective_weight -= peer->weight / peer->max_fails; | 497 peer->effective_weight -= peer->weight / peer->max_fails; |
498 | |
499 if (peer->fails >= peer->max_fails) { | |
500 ngx_log_error(NGX_LOG_WARN, pc->log, 0, | |
501 "upstream server temporarily disabled"); | |
502 } | |
498 } | 503 } |
499 | 504 |
500 ngx_log_debug2(NGX_LOG_DEBUG_STREAM, pc->log, 0, | 505 ngx_log_debug2(NGX_LOG_DEBUG_STREAM, pc->log, 0, |
501 "free rr peer failed: %p %i", | 506 "free rr peer failed: %p %i", |
502 peer, peer->effective_weight); | 507 peer, peer->effective_weight); |