nginx/nginx · error
NGX_LOG_WARN
NGX_LOG_WARN
Error message
load balancing method redefined
What it means
Error "load balancing method redefined" thrown in nginx/nginx.
Source
Thrown at src/stream/ngx_stream_upstream_hash_module.c:730
ngx_stream_upstream_srv_conf_t *uscf;
ngx_stream_compile_complex_value_t ccv;
value = cf->args->elts;
ngx_memzero(&ccv, sizeof(ngx_stream_compile_complex_value_t));
ccv.cf = cf;
ccv.value = &value[1];
ccv.complex_value = &hcf->key;
if (ngx_stream_compile_complex_value(&ccv) != NGX_OK) {
return NGX_CONF_ERROR;
}
uscf = ngx_stream_conf_get_module_srv_conf(cf, ngx_stream_upstream_module);
if (uscf->peer.init_upstream) {
ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
"load balancing method redefined");
}
uscf->flags = NGX_STREAM_UPSTREAM_CREATE
|NGX_STREAM_UPSTREAM_MODIFY
|NGX_STREAM_UPSTREAM_WEIGHT
|NGX_STREAM_UPSTREAM_MAX_CONNS
|NGX_STREAM_UPSTREAM_MAX_FAILS
|NGX_STREAM_UPSTREAM_FAIL_TIMEOUT
|NGX_STREAM_UPSTREAM_DOWN;
if (cf->args->nelts == 2) {
uscf->peer.init_upstream = ngx_stream_upstream_init_hash;
} else if (ngx_strcmp(value[2].data, "consistent") == 0) {
uscf->peer.init_upstream = ngx_stream_upstream_init_chash;
} else {View on GitHub (pinned to 3f6f7824d4)
When it happens
Trigger: Thrown at src/stream/ngx_stream_upstream_hash_module.c:730 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nginx/nginx@3f6f7824d4 (2026-08-22).
Data as JSON: /api/errors/eaad197d9b043559.
Report an issue: GitHub.