Skip to content

Slow restarts with chain-reload #2304

@xrmx

Description

@xrmx

With elastic-apm installed the following configuration uwsgi takes a lot to reload workers:

[uwsgi]
module = djangouwsgi.wsgi
http = :8000
enable-threads = true
chain-reload = true
touch-chain-reload = /tmp/uwsgi.reload
pidfile = /tmp/uwsgi.pid
processes = 2
threads = 2
master = true
vacuum = true

As they are killed after a 60s timeout:

Fri May 30 08:18:56 2025 - *** /tmp/uwsgi.reload has been touched... chain reload !!! ***
Fri May 30 08:18:56 2025 - chain next victim is worker 1
Gracefully killing worker 1 (pid: 1235583)...
Fri May 30 08:19:57 2025 - worker 1 (pid: 1235583) is taking too much time to die...NO MERCY !!!
worker 1 killed successfully (pid: 1235583)

Adding lazy-apps fixes the issue so we should investigate this and update the documentation if we are gonna to require that option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions