]> git.kaiwu.me - nginx.git/commit
AIO operations now add timers (ticket #2162).
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 29 Jan 2024 07:31:37 +0000 (10:31 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 29 Jan 2024 07:31:37 +0000 (10:31 +0300)
commitb794465178ecf48f13b37e4397145b05fd3fe6df
treef35d2c58a628ba0559ed04c9fcdf6c9097396bb3
parentcc4c3ee0a45ca3a2eeac2874e9199bf42560015c
AIO operations now add timers (ticket #2162).

Each AIO (thread IO) operation being run is now accompanied with 1-minute
timer.  This timer prevents unexpected shutdown of the worker process while
an AIO operation is running, and logs an alert if the operation is running
for too long.

This fixes "open socket left" alerts during worker processes shutdown
due to pending AIO (or thread IO) operations while corresponding requests
have no timers.  In particular, such errors were observed while reading
cache headers (ticket #2162), and with worker_shutdown_timeout.
src/http/ngx_http_copy_filter_module.c
src/http/ngx_http_file_cache.c
src/http/ngx_http_upstream.c
src/os/unix/ngx_files.c
src/os/unix/ngx_linux_sendfile_chain.c