]> git.kaiwu.me - njs.git/commit
Modules: limit waiting for shared dict state save on exit
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 14 Oct 2026 23:39:07 +0000 (16:39 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 15 Oct 2026 01:49:05 +0000 (18:49 -0700)
commit571a324b20a4b24f5679344a72d97ff0e355098d
treee05b8d466ac9e11c9161b689f77c44280fc2b893
parentac110b37fd7abb564822652c9e47d7a7ee0a6db6
Modules: limit waiting for shared dict state save on exit

If a worker dies while saving a shared dict zone state, the writing
flag remains set in shared memory and survives reloads.  Workers
with unsaved changes then receive NGX_AGAIN on every attempt and
keep rearming the save timer, so they never finish graceful shutdown.

Limit how long an exiting worker waits for an outstanding save to
60 seconds since the save started.  The shared writing flag is not
cleared and the writer is not interrupted, so a slow save is not
disturbed.  Running workers keep waiting as before.
nginx/ngx_js_shared_dict.c