Large downloads corrupt from filerun site when downloading zipped
I'm running the official filerun docker and I've noticed that when someone tries to download files/folders that fileruns serves as a zipped file being bigger than XX GB, the resulting file becomes corrupt.
Let's say for example I have 2 files:
normal.file is 10MB
big.file is 75 GB
If I try to download just the big.file, the file is ok, filerun just serves it as is.
But if I select both files and select download, fileruns serves a zip-file. This file becomes corrupted, every time.
Couldn't find anything about such limitations in the documentation.
Customer support service by UserEcho
What size does it get interrupted at? What's the size of the broken file?
According to the browser, the file doesn't get interrupted, it just says "completed".
Size of folder: 112 GB (121 099 365 245 bytes)
Size of downloaded zip: 76,2 GB (81 853 750 710 bytes)
Any news on this?
If everytime takes exactly the same amount of time before the transfer is interrupted, it's probably "max_execution_time" PHP directive which cuts it, so you will need to increase that value in the PHP configuration.
How would I go about changing that directive? As far as I can tell, the php.ini isn't exposed in docker.
Managed to change the execution time from 300 to 600 but it did not solve this issue unfortunately.
Also tried changing to the following settings:
memory_limit = 512M
post_max_size = 160M
upload_max_filesize = 160M
But none of them made a difference either, file size is 76.2GB every time (out of 112.8GB).
The above help only with uploading.
Have you confirmed the max_execution_time change with a phpinfo() page? Please upload the file "https://goo.gl/ens592" to your server, preferable inside the FileRun root installation folder, and check the active PHP configuration by opening its URL in the browser.
Any entries in the error log?
Oddly enough, the error log says this:
[22-Feb-2023 16:55:48 UTC] PHP Fatal error: Maximum execution time of 300 seconds exceeded in /var/www/html/system/classes/vendor/FileRun/Files/FormatUtils/Arch/Zip/Streamer.php on line 365
So even though it's clearly set to 600 as you can see in the screenshot above, that setting isn't being honored.
I see 300 in the config. The "Local value" is the one in effect. Probably active from inside the ".htaccess" file inside the root of the FileRun installation. Open it in a text editor and remove the line(s) "php_value max_execution_time 300".
Ahaa, so that's where the setting was coming from!
Changed it to something bigger and now downloads work as long as they don't hit the new limit (which I set to 90 mins).
Thanks so much for the help!
Good to hear that!