The "worker process is shutting down" is running all the time, How should I do?

Vis Lee lazyvislee at gmail.com
Fri Nov 10 09:51:50 UTC 2017


The nginx will add timer, the handler is as follows.  The
c[i].read->handler is not processing the 'close' and 'error' flag?

```
static void
ngx_shutdown_timer_handler(ngx_event_t *ev)
{
    ngx_uint_t         i;
    ngx_cycle_t       *cycle;
    ngx_connection_t  *c;

    cycle = ev->data;

    c = cycle->connections;

    for (i = 0; i < cycle->connection_n; i++) {

        if (c[i].fd == (ngx_socket_t) -1
            || c[i].read == NULL
            || c[i].read->accept
            || c[i].read->channel
            || c[i].read->resolver)
        {
            continue;
        }

        ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0,
                       "*%uA shutdown timeout", c[i].number);

        c[i].close = 1;
        c[i].error = 1;

        c[i].read->handler(c[i].read);
    }
}

```

2017-11-10 17:08 GMT+08:00 Vis Lee <lazyvislee at gmail.com>:

>
> Hi,
>
>
> The nginx is http proxy. when I use upgrade websocket and send heartbeat
> per 5s(client_body_timeout 6s;) the directives "worker_shutdown_timeout" is
> invalid, the "worker process is shutting down" produced by nginx -s reload
> is running all the time.
>
> How should I do?
>
> Regards,
>
> leevis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20171110/dbbdad0e/attachment-0001.html>


More information about the nginx mailing list