Unencrypted uploads larger than 2GB fail but the file is kept in the media_storage_path dir #12023
Comments
It seems to be a wrong type of database column. synapse/synapse/storage/schema/main/full_schemas/54/full.sql.postgres Lines 580 to 583 in f82d38e
|
Changing media_length integer to media_length bigint fixes the issue as far as uploading an unencrypted file is concerned with the latest version of synapse. |
Sorry for the bump, but any chance this could be fixed? We would like this for our lab's internal server, and it seems like it would just need a very simple schema delta, which is the sort of change that's easy to make but a pain to maintain downstream. |
Changing a type of a column is unfortunately not that simple (or at least not without taking a pesky lock on the table). I don't know the typical size of this table but there's a good chance it would ideally need a gradual migration. :( |
Fair enough, thanks for the update. We'll continue to work around it for now. |
off the top of my head, a general idea of the steps involved for such a gradual migration:
I wrote this on the spot and haven't thoroughly checked it... I hope to document this kind of thing up soon since I had to come up with this for some other work we're doing |
Description
When uploading a file >= 2GB to an unencrypted room, the upload fails after the whole file has been transferred. The file is stored in media_storage_path, but is invisible to the client. Uploading unencrypted files >= 2GB is possible with Element, fails with nheko. Uploading files >= 2GB to encrypted rooms seems to fail before the file is actually transferred regardless of client, so won't lead to the issue described here.
Steps to reproduce
Expected: The upload succeeds.
What happens instead: The upload fails, but the file is kept on the disk.
Version information
If not matrix.org:
Version: 1.52.0+bullseye1
Install method:
apt matrix-synapse-py3 via https://packages.matrix.org/debian/
Platform:
Debian 11 on a dedicated server
The text was updated successfully, but these errors were encountered: