uglyrobot/big-file-uploads

Available temp directory space may be exceeded

Closed this issue · 6 comments

Coysh commented

I get the following error trying to upload files larger than 2-3GB:

There was an error opening the temp file /tmp/bfu-c7985bae418e2c61b35c58d8fb32d43c.part for writing. Available temp directory space may be exceeded or the temp file was cleaned up before the upload completed.

Yes, rather than appearing to succeed and saving a corrupted file we now in the latest version detect the issue and give an error message. Unfortunately there are limits on every system how big of a file it can handle.

Coysh commented

@uglyrobot - Thanks.. Is there any way to change or fix this limit? I have full root access to this server to make changes.

I'm not sure on the exact cause, but it would be related to the size of your /tmp/ directory or how the cleanup runs. Example in this case maybe something happened like 1.5gb uploading in the .part file, then the next 20mb chunk was being uploaded to xxxxx.tmp by PHP, and since the directory ran out of space it deleted the .part file, so when we went to append the new chunk to the .part file it no longer existed.

Coysh commented

Hi @uglyrobot - There is plenty of space on the server and the /tmp directory, and there are no major cleanup operations happening.. any ideas?

I really don't. You could watch the .part file in the temp directory as the upload progresses to maybe see what happens to it. Basically each time a chunk finishes uploading, the plugin will append it to that .part file. After the last chunk it passes the .part file to the normal WP upload functions that process it and copy it into uploads. Maybe using a command like this https://trendoceans.com/linux-watch-command-guide/

Hi. I had this issue and just found out that memory_limit in php.ini was too low. It was set to 128M and the maximum file size I was able to upload was 100M. Set at 512M, I was able to upload a file of 350Mb, 400M failed. Hope it's help.