110
Views
5
Comments
[Extension FtpWebRequest] Exhausting all tcp/ip connections
Question
extension-ftpwebrequest
Service icon
Forge asset by Daniel Lourenço

Hi,


Please note that every call to a method of this extension created a new tcp/ip connection that is not closed in the end. The connections are closed later due to timeout.


This means that if we use this in a process that will call several methods very quickly, we will end up exhausting the tcp/ip connection pool.


multiconnect.png
2020-09-18 09-37-36
Devendra Baghel

Hi Carlos ,

Can you please share more detail . Are you trying to upload large file or you are trying to upload multiple files in a loop?

Regards

Devendra



UserImage.jpg
Michal Witek

Hi,

Is there any way to close the connection?

Regards,

Michal

2019-01-03 11-28-50
Silvio Garbes Lara

@Daniel Lourenço, I have the same problem.

Could this be the problem?

---


MssSendDataCommandMultiple

...

foreach (RCFileInfoRecord file in ssData)

{

    ...

    reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri));

    ...

    reqFTP.KeepAlive = (idx < ssData.Count); // Close only the last conection, the connection before is open.

    ...

}

...

MssReceiveDataCommand

    reqFTP.KeepAlive = false; // Don't have this.

...

MssGetDirAndFileList

    reqFTP.KeepAlive = false; // Don't have this.

...


2019-10-09 06-46-56
Daniel Lourenço
Staff

@Silvio Garbes Lara, good afternoon and thank you for your suggestion.

As I am currently not actively supporting this component, I will message the members in the account team asking whether they'd like to incorporate that improvement in the component-

Kind Regards,

Daniel Lourenço

2019-01-03 11-28-50
Silvio Garbes Lara

This issue was fixed in version 1.2.1

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.