Low bandwidth download hangs

Our application has the feature of downloading a file through a stream. This works well unless the user’s bandwidth is low, at which point the download simply hangs. I am using Phoenix channels and push the streaming out to a task, and like I said, it works great as long as the connection to the internet for the requesting browser is reasonable bandwidth (WiFi). But if I connect my laptop to my phone’s hotspot, I am able to reproduce the browser hanging due to the low bandwidth. The poorer the connection, the sooner it happens.

I am starting to think this is a general browser issue (happens in Chrome/FF/Safari consistently) along the lines of this

Anybody have any thoughts?

Is this really a matter of speed or more generally connection liability?

You should be able to simulate low bandwidth using the chrome developer tools

Yes, you could call it general connection liability.
We have sniffed on the socket and when it hangs, they suddenly get a bunch of TCP packets with bad checksums.

I have tried simulating the slower connection thru the developer’s tool. Unfortunately, it doesn’t seem to impact the download through the socket, only HTTP requests.

This could be related: Phoenix Websocket Error/Exception Handling