Hey all. I sent a download link from my nextcloud server to a friend, but it failed several times. I think it has to do with the file size, which was over 1.5GB, but I’m new to all this and I don’t know where to change the size limit.
For reference, I’m running NC as a TrueNAS jail and using NGINX proxy manager running in a docker container as the proxy. The files are all located on mounted external storage, which is my TrueNAS pool.
You could try bumping the PHP execution limit as well, just in case that is what is causing the problem. Without logs its difficult to troubleshoot remotely.
Depends on how you set it up, but you are looking for a php.ini file in /etc/php.
If you are using PHP 8.1 and PHP-FPM for example, it would be in /etc/php/8.1/fpm/php.ini.
You are looking for this directive:
; Maximum execution time of each script, in seconds
; https://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30
That is the timeout in seconds for execution. Try bumping that to something like 120.
– EDIT –
Also, take a look at the error logs. If you are using Nginx it would be /var/log/nginx/error_log I believe.
Yep, not an expert on PHP, but there should be some error logs somewhere it (PHP) writes in addition to nginx. HTTP protocol sends a status back to the browser before headers and before data starts - looking at the reply client side won’t be useful, it’ll almost always be reporting 200 success.
There also used to be an option ages ago (xsendfile x-accel-redirect) where PHP would hand over an open file descriptor and the HTTP webserver outside of PHP would take care of copying bytes onto the socket without having to involve PHP further. You should be able to tell from the nginx config whether it’s configured.
This solved the issue. Unfortunately my client’s download speeds on file shares are only 100kb/s, no idea if that’s related or not! But at least the other problem is resolved.