Open Ortmanns-Koeppern opened 2 months ago
Hi,
Thank you for opening this issue.
I am currently busy working on the 0.8.0 version and it took me a while to notice this thread, sorry about that.
I am unsure as what would cause this issue. How big is the file you're sending? I will try on my machine.
Also, could you please try this on your local machine with throttling on the browser?
I suspect this might be a "slow client" issue, where the buffer is full and awaiting a client to read from the buffer.
Thanks, B.
Problem
When sending files either by downloading them from the public folder as well as using the http_sendfile2 function, the timeout still applies to the request and cancels it if the download takes longer than the timeout allows.
Solutions/Workarounds
Although this problem can be mitigated by setting the timeout in general or the timeout for the specific request to a long duration, this solution can still cause problems because it would not dynamically adapt to the bandwidth of different clients. Another solution could be to use fio_touch, but I did not implement a working example for this approach.
Setup
Running fio with (could add the long timeout for the mentioned solution)
Sending files with this function
Notes
I am not that experienced with the library. If i missed any functionality or setup to solve this problem please let me know.