One thing: when we disable threads in config, and leave only "senfile on;" the problem was gone. So if problem caused by sendfile and non-atomic file updates, why it does not apeared when threads off ? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,264764,265214#msg-265214