I am having a very weird issue uploading larges files over 6GB. My process works like this:
- Files are uploaded via Ajax to an php script.
- The PHP upload script takes the $_FILE and copies it over in chunks, as in this answer to a tmp location.
- The location of the file is stored in the db
- A cron script will upload the file to s3 at a later time, again using fopen functions and buffering to keep memory usage low
My PHP(HHVM) and NGINX configuration both have their configuration set to allow up to 16GB of file, my test file is only 8GB.
Here is the weird part, the ajax will ALWAYS time out. But the file is successfully uploaded, its gets copied to the tmp location, the location stored in the db, s3, etc. But the AJAX runs for an hour even AFTER all the execution is finished(which takes 10-15 minutes) and only ends when timing out.
What can be causing the server not send a response for only large files?
Also error logs on server side are empty.