42
Views
6
Comments
[SFTP] Closing SFTP connections
Question
Forge component by Paulo Ramos
15
Published on 21 Jul 2020

Hi,

Are all the connections made to the SFTP-server closed by the component? 

Eg.: If I do a List action, will it then open a connection, do a list and then close the connection again? Or is the SFTP-server responsible to clean all open connections after an amount of time? 


I'm asking because we are seeing a lot of open connections on our SFTP-server... 


Thank you in advance.


Wietse 

Rank: #293

We are noticing something similar.  In our case if there is an exception on the extension side, such as File Not Found, the line to disconnect does not get called.  We are going to modify the extension to use a try/finally block and call disconnect inside the finally.

Rank: #476

Where using the SFTP extension to send files to a share. Because this is done by BPM for each process a sftp connection is created. Only there is no way to close the connection now so a lot of connections are created. Because of security the share is not allowing more then 6 connections. Would be great if a option to close connections is added to this extension!!



Rank: #495

Hi All,

Looking at the code, it seems that every Action includes a Connect & Disconnect. That suggests that there shouldn't be any ghost sessions hanging around.

Thanks,

Dave

Rank: #495

Hi Greg,

Yes, you're right...that is indeed a way for it to bypass the disconnect.

I have just made a version where all of the Actions include a try/finally block around the code between connect/disconnect. Testing it now.

David

Rank: #495

Hi All,

Tested OK. New version on Forge.

Thanks,

David