0 votes
by (140 points)

We are using Rebex version 2.0.4086.0 to download and upload files from/to SFTP server.

We are reusing the same rebex connection by checking the GetconnectionState() for downloading files from SFTP server.(ie, we are not disconnecting it always, we will check the connectionstate and if it is connected, we are using the same connection)

We are using GetFile() method for download activities. We observed that while handling heavy load, GetFile() is downloading the file, but the content is writing with previous filecontent (which has downloaded just before few microseconds).

Is there any known issue in GetFile() method as I have explained above? If it is there, please suggest a solution for it.

Applies to: Rebex SFTP

1 Answer

0 votes
by (142k points)

Even though Rebex SFTP 2.0.4086 is more than 6 years old, we are not aware of any issue resembling what you describe. What do you mean by "heavy load"? Are you calling GetFile multiple times at once? In any case, a communication log at LogLevel.Verbose makes it possible to inspect the raw content of SFTP data packets, which could be used to determine whether it's correct.

In any case, give the latest version a try. The API stayed almost the same, but the internals have been enhanced a lot.

by (140 points)
We are getting the above issues only when huge number of files are there in SFTP directory. Our system is using same connection object to download the file using GetFile() in a loop.

In new version, I could see one method Download() to download files. As per the Rebex Tutorials, this method is used to download multiple files from a directory.

Can I use the same method (ie Download ) to download a single file? Is it preferred over GetFile()?.
by (69.2k points)
You can use Download method for downloading single file also. It gives you possibility to use additional arguments such as ActionOnExistingFiles.

However, if you don't need additional features, it is preferred to use GetFile, because it can be a little bit faster (due to simpler initialization). But if you download large files (such as megabytes) it doesn't matter .
by (140 points)
We have purchased the new Rebex SFTP version. Still we are getting the same issue. The content is writing along with the previous file content while using GetFile().

Kindly note that we are not closing the connection each time. We are using the same connection object to download the files.

Please help us to resolve the issue.