Timeout error when uploading a file with some SFTP clients, e.g. WinSCP #1041
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1041
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When uploading a file (random generate), the upload is stopping at 100% with the error:
Host is not communicating for more than 15 seconds. Still waiting...
Warning. Aborting this operation will close connection!
Client:
WinSCP 4.2.7 (build 758)
OS:
Windows XP SP3 French
IRC discussion (slightly edited):
It's just possible that we may be able to fix this by sending keepalive packets on the connection. Whether this will work depends on whether the timeout is between a 'close' request and its response (in which case it won't help), or between any two SFTP packets.
Using a random encryption key instead of convergent encryption would solve this, right? Then the upload from Tahoe-LAFS gateway to storage servers (or helper) could proceed at the same time as the upload from SFTP client to Tahoe-LAFS gateway is proceeding. The cost would be that you lose convergence. We did a measurement on the allmydata.com customer base's files at one point. Unfortunately I don't recall precisely and a quick search hasn't turned up my published notes, but I think the estimated space savings from convergence for that set was less than 1%.
Replying to zooko:
Nope. The problem is that SFTP allows random access writes, so the SFTP client could write a large file, then go back and change the first byte just before the close.
It is possible to take advantage of streaming upload in the case where the file is opened with flags FXF_WRITE | FXF_APPEND (meaning that all writes will be at the end of file). Most clients don't use FXF_APPEND, though, even when they are going to write the file linearly.
#935 could be implemented in a way that fixes this problem: the 'close' would cause the file to be stored durably on the gateway, which would be responsible for uploading it to the grid asynchronously (even if the gateway crashes and restarts). That would be at the expense of a looser consistency model: a successful 'close' would only guarantee that the file is immediately visible via this gateway, not other gateways.
But in the common case that a client opens the file, writes the file in order from beginning to end, and closes the file (even though it doesn't give the
FXF_APPEND
flag), then using a random encryption key would make things work very well and using convergent encryption makes things fail, if the file is large enough, or become unreliable, if we do write-caching. Am I right?I hope that in the long run we extend Tahoe-LAFS to support out-of-order writes of immutable files too, so that the case you described would also be cleanly supported.
replying to myself:
Replying to zooko:
No, this doesn't make sense. What would the Tahoe-LAFS gateway do if, after it had streamingly uploaded the file, then the SFTP client seeked back to the beginning and wrote something?
This might still make sense, but it requires more changes to the Tahoe-LAFS upload logic.
In order to make the SFTP frontend work correctly with sshfs, we are planning to make the following changes (the first has already been done):
This was necessary because sshfs returns success from a close call immediately after sending the FXP_CLOSE mesage, without waiting for a response from the SFTP server.
So we could now send the response to FXF_CLOSE immediately, without compromising consistency as viewed through the SFTP frontend. That would fix this bug, but with the following negative side-effects:
This problem is documented in wiki/SftpFrontend.
Simple workaround work for me: Set WinSCP->Connection->Timeouts to 6000 seconds (maximum allowed). I succesfully uploaded 185MB file thru 1Mbit line on first attempt.
To be honest, second test to large upload was also succesful, but WinSCP crashed immediately after upload finished :).
Error when uploading a file with WinSCP in SFTPto Timeout error when uploading a file with some SFTP clients, e.g. WinSCP