-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Weirdly large file upload failed. #12937
Comments
looks the same as #6192 |
Nope, because:
|
I don't think #6192 is particularly confined to reverse-proxies, but ok. Your logs show fairly clearly that the client is closing the connection:
... can you share a tcpdump of the traffic between the client and the server demonstrating the problem, along with logs with timestamps? |
File Description: |
What kind of storage does Twisted initially saves the upload to a temporary file, and then synapse copies it to the media store. Twisted handles client disconnection by closing the |
For the record, Element Web times out the request 30 seconds after it has uploaded the last byte of the file: https://github.com/matrix-org/matrix-js-sdk/blob/12253064d14b6a3f3b043cf3bdd382d520d0c13b/src/http-api.ts#L419-L423 |
We could avoid the slow copy by uploading straight to the media store, or a temporary file on the same mount? On Linux >= 3.11, it's possible to create a temporary file using |
This zip file is showing up as password-protected so I can't access the dumps and logs. Can you share a version without the encryption (or if this was intentional, get in touch with the password?)? :) |
Since the last file has not been downloaded for a long time, I removed the decompression password. Unzip password: |
The logs you've shared with me are showing that the request is taking 31 seconds to be processed, which going by the above (copied below) would mean that Element Web would cut off the upload
As a note: I'm afraid the TCP dump is not very revealing; the packets seem to have been truncated very short (I'm not sure why, perhaps worth trying with an explicit snaplen using However I think @squahtx has made some valid points which probably explain what is happening here (especially noting that your logs show that the request is taking 31 seconds, which is more than the 30 seconds than Element Web will cut off after!). Broadly:
The remedy suggested by Sean also makes perfect sense to me: it should be possible to write the file once only and then rename it to the correct place instantly. |
I'm tracking this as #13009 so that it's easier to pick up without having to follow the stream of investigation here. If you think I've missed any other problems that are contributing to this issue, please let me know! |
Description
Failed to upload large file. The failure only occurs after the upload progress is complete.
homeserver.yaml
configuration allows a single file upload with a maximum size of 2048 MB.I tested a total of 11 files, ranging in size from 1.0 GB ~ 2.0 GB. There is a failure when uploading a 1.7 GB file.
Log when upload fails:
Client used for testing:
Steps to reproduce
Version information
If not matrix.org:
Version: 1.60.0
Install method: Docker
The text was updated successfully, but these errors were encountered: