Chunked transfer encoding with Live video stream does not clean tmp files
|Reported by:||Owned by:|
|uname -a:||Linux qa.unified-streaming.com 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux|
nginx version: nginx/1.12.0
configure arguments: --sbin-path=/usr/local/sbin --add-dynamic-module=/var/www/test/nginx_mod_http_catch_body_filter
When using 'chunked transfer encoding' Nginx writes the POSTed content to a tmp file (or files).
This will fill up the disk with a large file, but also when a 24/7 Live video stream is sent using chunked transfer encoding. It basically is a a long standing POST where chunks of data are sent within that POST, so the connection is not closed until the stream stops and as it is a 24/7 live linear stream this equals to 'never'.
Nginx therefore cannot be used with a Live when the ingest is handled with a 'request body filter'.
I attach the reference module that shows this behaviour as well as a curl line to do the post.
2017/07/05 12:57:33 [warn] 25407#0: *4 a client request body is buffered to a temporary file /usr/local/nginx/client_body_temp/0000000002, client: 127.0.0.1, server: localhost, request: "POST /large-file-pretending-to-be-video.ismv HTTP/1.1", host: "127.0.0.1:8080"
2017/07/05 12:57:33 [crit] 25407#0: *4 pwrite() "/usr/local/nginx/client_body_temp/0000000002" failed (28: No space left on device), client: 127.0.0.1, server: localhost, request: "POST /large-file-pretending-to-be-video.ismv HTTP/1.1", host: "127.0.0.1:8080"