Problem when downloading large files using Storage module I'm using the Storage module to managed uploads on my website. I'm hosted on EC2, some content is sent to S3, and some stays on EC2.

Logged in users are able to transfer files to each other. One user uploads the file, and the other goes to download it.

The files that are causing problems are stocked on EC2.

A user is able to upload a large file (4 gb for example), to the server, but when someone tries to download the file, they get a file of 0b.

I checked via FTP and the file is there and complete (i downloaded it and opened it).

When moving the file to another directory (/default/files/file.zip), it works. If it is in the "/system/storage/serve/359/file.zip" it doesn't work.

--- EDIT ---

Forgot to mention that it DOES NOT happen with small files.

--- EDIT ---

Does anyone has any suggestion?

Thanks !
I would have preferred to put this into a comment, but I don't have enough rep points yet. :/

First, a few questions: What version of PHP are you using?  Does the same thing happen with small files?  Are you using symlinks?  Do your server logs show anything suspicious?

I am trying to fix a similar problem on one of my sites.  PHP 5.4 works fine, but 5.5 is choking when trying to interact with the file, which happens to be linked into a mounted filesystem.  They are on different versions of Ubuntu as well, so I am currently trying to figure out if it is a Linux kernel bug, a PHP bug, or a PEBKAC error.