Using Docker installation method
Yes
Host Operating System
CentOS7
Describe the bug
We're unable to pull any backups from our VPS, because it runs into errors with exceeding maximum execution time
To Reproduce
Attempt to download a large backup (20+gb)
Expected behavior
It to download and not run into errors.
Relevant Logs
web_1 | 2020/02/20 18:59:39 [error] 58#58: *102 FastCGI sent in stderr: "PHP message: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/azuracast/www/vendor/guzzlehttp/psr7/src/Stream.php on line 225" while sending to client, client: %%%, server: localhost, request: "GET /admin/backups/download/dGVzdC56aXA= HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "radio.crosshosting.tk:4430"
Screenshots
None.
Device(s):
win10, desktop, chrome, latest
Additional context
@SC2Mitch Serving files directly through PHP has worked well for us for most files (little media files, album art, etc.) but as we scale into larger files like backup downloads, it really stops working well at all and just ends up consuming an insane amount of memory.
I've updated both our nginx configuration and various parts of the application to use nginx's built-in X-Accel-Redirect functionality, which will put nginx in charge of managing serving the download to your browser, which not only uses far less resources but is far faster. This is now applied to media downloads, album art, DJ broadcasts, and backup downloads.
Hopefully this improves the system performance at large.
Thank you, we'll give it a blast and let you know if any issues come up.
Most helpful comment
@SC2Mitch Serving files directly through PHP has worked well for us for most files (little media files, album art, etc.) but as we scale into larger files like backup downloads, it really stops working well at all and just ends up consuming an insane amount of memory.
I've updated both our nginx configuration and various parts of the application to use nginx's built-in
X-Accel-Redirectfunctionality, which will put nginx in charge of managing serving the download to your browser, which not only uses far less resources but is far faster. This is now applied to media downloads, album art, DJ broadcasts, and backup downloads.Hopefully this improves the system performance at large.