Originally Posted by
DrByte
Adding to lat9's question, keep the following in mind:
- download-by-streaming relies on a PHP process to read the file in small increments (4K chunks) and serve those out as a stream of data until done. It's intended to bypass memory limits imposed by your server config especially when dealing with very large files. It also increases the max duration time of the download to 25 minutes (if your server's PHP hasn't been configured to disallow that).
If download-by-streaming is cut off at exact 1GB (converted to bytes) then it would suggest that the server filesystem is refusing to give the data to PHP after that size. If the size is some random amount different than exactly 1GB then it suggests a timeout or network interruption.
- download-by-redirect creates a symlink, and then your visitor is redirected to that symlink so that Apache/Nginx serves the file directly, independent of PHP. In that case if it's terminating at exactly 1GB (converted to bytes) then maybe something in your Apache configuration needs attention (ie: maybe Apache has a setting?)?
-- note also that sometimes the symlink approach can be problematic if several people buy and download the same thing at the same time, because there's some garbage-collection that cleans up old symlinks, and if that happens during someone's download it could terminate at an unpredicted spot, and without any notification.
Your Apache/Nginx logs may give you more insights about download-by-redirect downloads. You won't find those in PHP logs.
Bookmarks