Tips – Nginx and upload

Cli

$ sudo lsof -p NGINXPID
$ sudo lsof -p 671 |grep deleted
nginx   671 www-data   45u      REG              202,1 3354454820               393379 /var/lib/nginx/body/0000000005 (deleted)
$ sudo lsof | grep body
 nginx       671       www-data   45u      REG              202,1 1556957988               393379 /var/lib/nginx/body/0000000005 (deleted)

nginx.conf

client_body_temp_path /var/lib/nginx/body;

/var/lib/nginx/body

Nginx save temporary upload files in this folder.

Sources:

https://github.com/Chocobozzz/PeerTube/issues/1423#issuecomment-454267626

“iwascraig commented on Jan 15
I have this problem also .. not related to CPU size.. the problem is related to upload file size…
my /var/lib/nginx/body folder is on a system volume that is only 10GB in size… when I try to upload a 15GB file (research data, often this large or larger) I run out of space and client gets error.”

http://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_temp_path