Possible cached file corruption with aio_write enabled
nginx-forum at forum.nginx.org
Wed May 25 12:15:49 UTC 2016
I've recently upgraded one of the nginx servers within a caching
(proxy_cache module) cluster from 1.8.1 to 1.10 and soon after I noticed
unusually high number of various errors only on that server which I
eventually pin pointed to a mismatch between the actual cached file size on
disk and size reported in file metadata (either content-length or something
else). Apparently, cached files on 1.10 are cut short and miss up to few
hundred kilobytes at their ends (for files over 100 MB in total size). For a
few files I checked, the larger file was, more content it missed at the end.
Eventually I found the culprit to be aio_write which I enabled the same time
I upgraded nginx. Disabling it and removing all already cached files
resolved the problem.
thread_pool default threads=4 max_queue=65536;
# output_buffers are used if sendfile is not used
# output_buffers 8 512k;
proxy_cache_path /cache ... use_temp_path=on;
proxy_buffers 32 64k;
OS is Linux 4.1.
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,267142,267142#msg-267142
More information about the nginx