So I have a docker + NodeJS + ExpressJS app. Which runs on port 3888, however I have the domain pointed to the server IP address via Route53.
I am having an issue where if I connect directly to the port number of the docker app to request the mp3 file – which is streamed by GCS to the nodeJS app it all works fine.
But when proxied via NGINX it disconnects randomly sometimes at 7min sometimes at 20 min.
Note the file is 60min long however we should be able to stream a 3 hour long audio file.
Here is my Proxy code
server {
listen 80;
server_name DOMAIN.COM;
location / {
client_max_body_size 4g;
proxy_pass http://localhost:3888;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_connect_timeout 7200;
proxy_send_timeout 7200;
proxy_read_timeout 10800s;
}
}