nginx/nginx · error

NGX_LOG_EMERG

NGX_LOG_EMERG

Error message

invalid value \"%V\" in \"%V\" directive

What it means

Error "invalid value \"%V\" in \"%V\" directive" thrown in nginx/nginx.

Source

Thrown at src/http/modules/ngx_http_upstream_keepalive_module.c:601

ngx_http_upstream_keepalive(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
    ngx_http_upstream_keepalive_srv_conf_t  *kcf = conf;

    ngx_int_t    n;
    ngx_str_t   *value;

    if (kcf->max_cached != NGX_CONF_UNSET_UINT) {
        return "is duplicate";
    }

    /* read options */

    value = cf->args->elts;

    n = ngx_atoi(value[1].data, value[1].len);

    if (n == NGX_ERROR) {
        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                           "invalid value \"%V\" in \"%V\" directive",
                           &value[1], &cmd->name);
        return NGX_CONF_ERROR;
    }

    kcf->max_cached = n;

    if (cf->args->nelts == 3) {
        if (ngx_strcmp(value[2].data, "local") == 0) {
            kcf->local = 1;

        } else {
            ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                               "invalid parameter \"%V\"", &value[2]);
            return NGX_CONF_ERROR;
        }
    }

View on GitHub (pinned to 3f6f7824d4)

When it happens

Trigger: Thrown at src/http/modules/ngx_http_upstream_keepalive_module.c:601 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/81102b0cc828cc39. Report an issue: GitHub.