SSH/SFTP Server Listen Backlog issue

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

SSH/SFTP Server Listen Backlog issue

Post by tcaduto12068 » Wed 17 Aug 2016 06:04

Hi,
Just a FYI, you have the listen backlog set way to low and it causes problems on a busy server.

For example if you use the SSH server with the SFTP server and you use filezilla and have it set to 10 max concurrent connections the server will raise a error that it can't create event.
I figured this was because of the backlog and looked in the code and sure enough it was set in one location in the code to 3 and another to 5.

I increased this to a bigger number and all the errors related to filezilla and multiple concurrent connections went away completely.

What would be really nice if is you could add a backlog param in the component editor like the Indy FTP server has so we can adjust the listen backlog as needed.

Oh, just so you know I built a small managed SFTP/FTP server using Sbridge and Lazarus and it's working outstanding, yesterday it uploaded and processed/moved using SQLite rules over 1000 files.

Thanks,

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SSH/SFTP Server Listen Backlog issue

Post by ViktorV » Wed 17 Aug 2016 08:12

Thank you for being interested in our products.
We will add this functionality in one of the next SecureBridge versions.

tcaduto12068
Posts: 132
Joined: Wed 17 Aug 2016 05:57

Re: SSH/SFTP Server Listen Backlog issue

Post by tcaduto12068 » Wed 17 Aug 2016 14:50

Hi Victor,
I love sbridge been upgrading license every year as I use it alot.

Anyways, the 'Cannot create event' error was not due to the small back log.

The error is being raised in ScVIO in the constructor for TAsyncThread.Create on line: 359

The error is raised when I was stress testing the SFTP server with Filezilla. What I did was set the max conncurrent connections to 10 and selected more than 10 files to upload and it works flawlessly for several attempts and then randomly it raises "Cannot create event" and the connection terminates.

The error is being raised by calling GetLastError but the exception message does not show the error code or the error message string, so no way to know what the actual exception was.

If I keep the max concurrent connections in Filezilla to 5 the error never gets raised.

Any Ideas?

Thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SSH/SFTP Server Listen Backlog issue

Post by ViktorV » Thu 18 Aug 2016 09:06

SecureBridge create a lot of handles when creating SSH server and further working with it. This error occurs, when the system can't allocate a handle for creating a new event.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: SSH/SFTP Server Listen Backlog issue

Post by ViktorV » Fri 18 Nov 2016 13:27

We added the TScSSHServer.Options.ListenBacklog property. The new buid of SecureBridge 7.2.3 including this addition is already available for download.

Post Reply