]> git.kaiwu.me - nginx.git/commit
Fix of cpu hog in event pipe.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Sep 2011 09:55:27 +0000 (09:55 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 20 Sep 2011 09:55:27 +0000 (09:55 +0000)
commite4dab80e802241e416170b9686d8484eaa1f90f4
treef31268c1df8f71ccdce9e46df64eaf1569e0d11e
parentc8df23cb29146c1dfca82141e19b1049b1fc1011
Fix of cpu hog in event pipe.

If client closed connection in ngx_event_pipe_write_to_downstream(), buffers
in the "out" chain were lost.  This caused cpu hog if all available buffers
were in the "out" chain.  Fix is to call ngx_chain_update_chains() before
checking return code of output filter to avoid loosing buffers in the "out"
chain.

Note that this situation (all available buffers in the "out" chain) isn't
normal, it should be prevented by busy buffers limit.  Though right now it
may happen with complex protocols like fastcgi.  This should be addressed
separately.
src/event/ngx_event_pipe.c