such an exception was found in online Nginx error.log
2019/01/26 05:18:00 [crit] 23913-sharp23913: *232549515 open() "/usr/local/nginx/proxy_temp/0/27/0000004270" failed (13: Permission denied) while reading upstream, client: 100.97.126.50, server: foo.bar.com ...
searched for what someone said
the problem lies in proxy_temp_file_write_size. When your file exceeds the size set by this parameter, nginx will first write the file to the temporary directory
so I want to simulate locally
- revoke read and write permissions for proxy_temp
d-2 zhugw admin 64 Jan 9 15:26 proxy_temp
-
set
proxy_temp_file_write_size
only 256bytes
location / {proxy_buffer_size 256; proxy_buffers 2 256; proxy_busy_buffers_size 256; proxy_temp_file_write_size 256;
}
- then request an image of 332KB. I think it should reproduce the error log online
upload ~ curl-I http://localhost/Boston_City_...
HTTP/1.1 200OK
Server: nginx/1.15.8
Date: Sat, 26 Jan 2019 13:12:52 GMT
Content-Type: image/jpeg
Content-Length: 339773
Last-Modified: Sat 26 Jan 2019 11:41:10 GMT
Connection: keep-alive
ETag: "5c4c4756-52f3d"
Accept-Ranges: bytes
but there is no error log in Nginx error.log, even when concurrent requests are attempted, no error log is generated
~ ab -n 1000 -c 50 http://localhost/Boston_City_Flow.jpg
what is this? How can we repeat this mistake?
"/usr/local/nginx/proxy_temp/0/27/0000004270" failed (13: Permission denied) while reading upstream