Closed HarHarLinks closed 2 years ago
Okay so while trying to repro the error message element gives, the problem seems to have disappeared? Maybe server was just overloaded?
sounds like a dup of https://github.com/matrix-org/synapse/issues/6192
Except, if I correlate these correctly, it happened uploading a 56.4KiB jpg to a server with max_upload_size: "50M"
It's good to hear that things are working for you again!
I suspect this is a bug in Synapse rather than the S3 storage provider.
Perhaps the error is triggered when a client aborts a file upload midway through? I'm not sure how we'd reproduce that scenario with curl
Finally reproduced it. The client needs to disconnect in the narrow time window in between Synapse receiving the end of the uploaded data and writing the file to disk.
I had nginx in front of Synapse, but telling it to avoid buffering uploads didn't make a difference. It looks like Twisted does some buffering too(?).
Steps to reproduce the error
UploadResource._async_render_POST
curl -v -X POST -d some_test_data https://your.homeserver.org/_matrix/media/r0/upload -H "Authorization: Bearer syt_your_access_token_here"
curl
with Ctrl+CValueError: I/O operation on closed file.
I can't see how this would result in what you saw though, since in this scenario it's the client intentionally aborting the upload. It's also a synapse bug, unrelated to the upgrade and the storage provider.
I think we should treat this as a dup of #6192. An overlarge file (causing the reverse-proxy to drop the connection) is one potential cause, but clearly not the only cause, as evidenced by the comments on that issue.
Closed as duplicate of #6192
since in this scenario it's the client intentionally aborting the upload
Or Synapse is taking too long to process the upload and clients are timing out the request
Describe the bug I upgraded synapse-s3-storage-provider together with synapse 1.45.1 using
pip install --force-reinstall
, but had to downgrade back to 1.43 (https://github.com/matrix-org/synapse/issues/11049#issuecomment-948545163). Now can't upload media, error log:Is matrix-org/synapse-s3-storage-provider#62 not backwards compatible after all?
The following also happen:
synapse.rest.media.v1._base - 256 - WARNING - GET-40201- Failed to write to consumer: <class 'Exception'> Consumer asked us to stop producing
- in bursts of 20 or sosynapse.rest.media.v1.media_repository - 425 - WARNING - GET-57021- Not retrying destination 'domain.tld'
- occurs twice every other minute, always the same domain. Others also occur less regularly.Server:
Desktop (please complete the following information):
Additional context
pip freeze
(maybe synapse-s3-storage-provider could use some versioning beyond 1.0?)
homeserver.yaml