Page 1 of 1

SSH/SFTP Server Listen Backlog issue

Posted: Wed 17 Aug 2016 06:04
by tcaduto12068
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,

Re: SSH/SFTP Server Listen Backlog issue

Posted: Wed 17 Aug 2016 08:12
by ViktorV
Thank you for being interested in our products.
We will add this functionality in one of the next SecureBridge versions.

Re: SSH/SFTP Server Listen Backlog issue

Posted: Wed 17 Aug 2016 14:50
by tcaduto12068
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

Re: SSH/SFTP Server Listen Backlog issue

Posted: Thu 18 Aug 2016 09:06
by ViktorV
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.

Re: SSH/SFTP Server Listen Backlog issue

Posted: Fri 18 Nov 2016 13:27
by ViktorV
We added the TScSSHServer.Options.ListenBacklog property. The new buid of SecureBridge 7.2.3 including this addition is already available for download.