nginx/nginx · error

NGX_LOG_CRIT

NGX_LOG_CRIT

Error message

request reference counter overflow while processing \"%V\"

What it means

Error "request reference counter overflow while processing \"%V\"" thrown in nginx/nginx.

Source

Thrown at src/http/ngx_http_core_module.c:2421

{
    ngx_time_t                    *tp;
    ngx_connection_t              *c;
    ngx_http_request_t            *sr;
    ngx_http_core_srv_conf_t      *cscf;
    ngx_http_posted_request_t     *posted;
    ngx_http_postponed_request_t  *pr, *p;

    if (r->subrequests == 0) {
        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                      "subrequests cycle while processing \"%V\"", uri);
        return NGX_ERROR;
    }

    /*
     * 1000 is reserved for other purposes.
     */
    if (r->main->count >= 65535 - 1000) {
        ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
                      "request reference counter overflow "
                      "while processing \"%V\"", uri);
        return NGX_ERROR;
    }

    if (r->subrequest_in_memory) {
        ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                      "nested in-memory subrequest \"%V\"", uri);
        return NGX_ERROR;
    }

    sr = ngx_pcalloc(r->pool, sizeof(ngx_http_request_t));
    if (sr == NULL) {
        return NGX_ERROR;
    }

    sr->signature = NGX_HTTP_MODULE;

View on GitHub (pinned to 3f6f7824d4)

When it happens

Trigger: Thrown at src/http/ngx_http_core_module.c:2421 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/b8021386a2b2f676. Report an issue: GitHub.