Disable memory buffer for file uploads

akaris nginx-forum at nginx.us
Wed Mar 23 03:17:28 MSK 2011


I'm using the latest version of Nginx, PHP/PHP-FPM on a Linux machine
with 2GB of ram and plenty of hard disk space.

My problem is this: when I upload a large (2GB, for exemple) file on my
Web site, Nginx buffers the whole file in memory, and this will be come
a huge problem as we're going to have a lot of users uploading large
files in a near future. So I gave a try to the Nginx upload module as I
thought it would write directly to disk and skip memory, but no, I still
have the same issue.

I'm currently looking at solutions like Plupload (Flash uploader) that
can chunk an upload in many small files - but the perfect solution would
be to be able to tell Nginx to write the client body directly to file,
and never keep it in memory.

Is it possible?


Posted at Nginx Forum: http://forum.nginx.org/read.php?2,185014,185014#msg-185014

More information about the nginx mailing list