Skip to content

Issues with large file (media) transfers. #3890

@YamatoRyou

Description

@YamatoRyou

Your use case

This article is a rewrite of #3613 with some new content.

Test environment:

  • Self-hosted Synapse instance, version 1.123.0
  • Client: Element X Android 0.7.6 (F-Droid)
  • Tested with a file of 1.49 GB, which is neither audio nor video.
  • Synapse configuration file homeserver.yaml specifies a maximum media upload size of 1536 MB.
  • nginx configuration client_max_body_size has a value of 1536 MB;
  • Test environment has 1000 Mbps Wi-Fi bandwidth (802.11ax), of course, the speed during upload or download is usually not close to the upper limit, but this is the maximum bandwidth I can provide.
  • Device: OnePlus MT2110, Pixel OS (Android 14)

The following issues were found during upload and download tests respectively:
Download:

  1. Due to factors such as file size and download speed, EXA will immediately interrupt¹ some download tasks once they last for 30 seconds (that is, no matter how large the file is, EXA will only allow the download to be completed within 30 seconds). The reason is unclear to users, and I can't figure out why the team would deliberately limit EXA from downloading large files. Here is a note: the forced interruption occurs 30 seconds after receiving the file (media) data from the server, not when requesting it from the server, which means that my reverse proxy configuration is basically fine;
  2. There is no properly designed progress bar, and I can't know the download progress;

Upload:

  1. The above file cannot be uploaded, and a white banner will be displayed at the bottom of the screen after about 30 seconds²: "Media upload failed, please try again". Smaller files (such as 500 MB) can be uploaded;
  2. There is a waiting time before the upload officially starts. I guess it is reading the file into memory or copying a copy to a directory controlled by the app during this period. The specific time depends on the file size;
  3. There is no properly designed progress bar, and I can't know the upload progress.

Have you considered any alternatives?

I replaced the hard disk for the hardware running Synapse not long ago, which has greatly improved the write performance. However, such files still cannot be transferred smoothly in EXA, So I temporarily chose external services as a substitute.

Additional context

¹ If the file is a video, then I need to wait for it to be fully downloaded before I can start watching it. But because of that strange limitation, EXA cannot meet this requirement;
² I'm not sure if it's the same logic as the limit during downloading;

To further rule out the network problem, I repeated the above test using Element Android (1.6.24); Element Web (1.11.84) and desktop client, and the results were all successful in uploading/downloading.

Are you willing to provide a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-EnhancementNew features, changes in functionality, performance boosts, user-facing improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions