[PATCH 0 of 6] conditional rearm of write timeouts

Maxim Dounin mdounin at mdounin.ru
Fri May 2 00:43:03 UTC 2025


Hello!

The following patch series introduces conditional rearm of write
timeouts (and also does some related cleanup).

Notably, this might be beneficial on Linux under memory pressure, when
requested send buffers cannot be allocated and writev() returns EAGAIN
without any progress, yet write events are reported by kernel, resulting
in a busy loop.  And, more importantly, making existing write timeout
handling ineffective.

Suggested change is to only rearm write timeouts if some progress was
made, in most cases detected by comparing c->sent with the original
value as saved at the start of the event handler.

Comments are welcome.

-- 
Maxim Dounin



More information about the nginx mailing list