Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set a timeout for downloading media. #3613

Closed
YamatoRyou opened this issue Oct 7, 2024 · 3 comments
Closed

Don't set a timeout for downloading media. #3613

YamatoRyou opened this issue Oct 7, 2024 · 3 comments
Labels
A-Media O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@YamatoRyou
Copy link

Your use case

What would you like to do?

n/a

Why would you like to do it?

For large files, if the download fails to complete within 30 seconds, the app will forcefully interrupt the download and return an error to the user. This includes video; audio or other types of files.

For this design, the following problems will arise:
a) Large videos or audio (or other audiovisual media formats) will be forced to be interrupted by the app before starting to play;
b) Large files will be forced to be interrupted by the app after downloading for a period of time;
c) Data is wasted and the download cannot be successfully completed, resulting in a lose-lose situation.
The above problems occurred under an excellent network condition (1000 Mbps WLAN) and tested with a 1.5 GB file. The only reason I can think of is to try to guide users to give up uploading too large files in the Matrix ecosystem.

How would you like to achieve it?

n/a

Have you considered any alternatives?

n/a

Additional context

n/a

Are you willing to provide a PR?

No

@YamatoRyou YamatoRyou added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Oct 7, 2024
@mackerel225
Copy link

I think timeout is important, but it shouldn't timeout if it has active connection

@bmarty bmarty added S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems O-Occasional Affects or can be seen by some users regularly or most users rarely A-Media and removed T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements labels Oct 9, 2024
@spaetz
Copy link

spaetz commented Oct 9, 2024

There are a number of timeouts that could be at play here. For such a large file, it is more likely that your homeserver reverse proxy (nginx, caddy, traefic...) have timeouts that kick in.

If you are using the matrix.org homeserver, I don't know their limits, but I am pretty sure they don't want to serve as a file host for large files.

@YamatoRyou
Copy link
Author

There are a number of timeouts that could be at play here. For such a large file, it is more likely that your homeserver reverse proxy (nginx, caddy, traefic...) have timeouts that kick in.

If you are using the matrix.org homeserver, I don't know their limits, but I am pretty sure they don't want to serve as a file host for large files.

I ran the above tests on a self-hosted Synapse instance.
The timeout here means:

  • The download started as expected and had a constant download speed, but was forcibly interrupted by the client because it failed to complete within 30 seconds. This means that some files over a certain size will definitely not be downloaded within 30 seconds even on a 1000Mbps LAN and without the intervention of a reverse proxy.

This client design is confusing. From all aspects (including database design and client design, etc.), Matrix does not seem to welcome large files.

@YamatoRyou YamatoRyou closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Media O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

4 participants