Welcome! Log In Create A New Profile

Advanced

Streaming remote files with PHP-FPM and Nginx?

Posted by suriwat 
Streaming remote files with PHP-FPM and Nginx?
June 04, 2017 02:02AM
I'm trying to stream a file from a remote server to the client. But it seems as though the buffers are messing with something causing the download speed to be much higher than the download speed.

with php fpm as backend upstream sock file.

Remote server -> Nginx server -> Client
How can I have Nginx stream the remote file in a 1:1 ratio?

i dont want nginx first buffer and then send it to me.
But synchronously.

I have mounted rclone /drive as
nextcloud external storage
when i start to download some big file i see it in bmon that my vps is downloading it and serving to me. But when i cancel it, it still is downloading until whole file is loaded somewhere into memory. I have to do service php7.0-fpm restart to make it stop downloading. service nginx restart do nothing.


but i cant find solution, i have every proxy off buffering, still doesnt help.
Please help thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 154
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready