You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm investigating a file corruption issue with large FTP uploads when using custom buffer sizes.
It looks like failures occur only with files larger and 11 megs or so, and only if the default buffer size is changed. I'm attaching a large generated file and when uploading this file I end up with an output file of the same size, but corrupted data. It doesn't happen on all files, but
Changing the buffersize to its default size of 50,000 makes this work. Playing around with various sizes it seems to work between 40-60000 - anything smaller and larger seems to fail, but not sure if that's coincidental.
Not really a big issue since I can certainly ignore the buffersize (we're using SftpClient in an FTP abstraction wrapper), but something seems very wonky about this. Small files under 10 megs seem to work without issue - it's only with larger files that this shows up. Depending on the buffersize settings (our default was around 24k) the file differences start showing around the 11 meg mark with transposed byte sequences for a small block.
As an aside: Using the higher level DownloadFile() function seems to work fine.
I see this when writing a file via SFTP. A buffer size of 32768 works; a buffer size of 65536 causes transposed byte sequences. Related to SFTP packet size?
I'm investigating a file corruption issue with large FTP uploads when using custom buffer sizes.
It looks like failures occur only with files larger and 11 megs or so, and only if the default buffer size is changed. I'm attaching a large generated file and when uploading this file I end up with an output file of the same size, but corrupted data. It doesn't happen on all files, but
The following code fails with the fail attached:
Changing the buffersize to its default size of 50,000 makes this work. Playing around with various sizes it seems to work between 40-60000 - anything smaller and larger seems to fail, but not sure if that's coincidental.
Not really a big issue since I can certainly ignore the buffersize (we're using SftpClient in an FTP abstraction wrapper), but something seems very wonky about this. Small files under 10 megs seem to work without issue - it's only with larger files that this shows up. Depending on the buffersize settings (our default was around 24k) the file differences start showing around the 11 meg mark with transposed byte sequences for a small block.
SENDFILETEST.zip
The text was updated successfully, but these errors were encountered: