Start a new topic

Keep Alive in FTP connections

There is no "Keep Alive" setting for FTP-connections. This causes crashes and loss of information if a file is opened in a text-editor and you try to save it back to the server.


It is almost standard in FTP-clients (eg FileZilla / WinSCP)  that connections are kept alive to prevent this. So this is more a reminder to implement something that is needed than a new idea ;-)


1 person likes this idea

I noticed - at least on my hosted server - that a FTP connection over SSH stays alive much longer.

Still want the "Keep Alive" function implemented, because I still loose files that I am working on when the connection is lost and that is a real problem.

I agree. FTP Keep Alive is mandatory. Any updates on implementing this?

Hi!


Can you check out the Royal TS V6 beta:

https://royalapps.com/ts/win/features-beta


It has support for configuring a keep-alive interval.


Regards,

Stefan

Sorry, I did not realise this was the Windows-specific part of the forum. I am on Mac. Does this apply to the Mac-version of the Beta as well?

Yes, the same is available on Royal TSX for macOS.

Thanks Stefan, I tried it. It does not work. I set the timeout to 20 seconds for the FTP connection, but it still gets closed by the server. What exact command is used by the keep alive? Can I set it somewhere?

Stefan, I read the following from another FTP-client:


"Our FTP client sends a random command such as NOOP or LIST or CWD to the server in order to keep the connection alive every several minutes."


Are you doing it the same way? Just sending NOOP every X seconds will not fool all FTP servers.

Stefan, btw, I don't see any notice on the botom status-bar that the keep alives are being sent. Am I suppose to? Would make sense to see something like "Sending keepalive..." every X seconds to know it's working.

Hi Daniele,


we are using a 3rd party component which provides this functionality. According to their docs here:

https://api.rebex.net/?_ga=2.241768395.833692725.1623061335-1043880255.1611934016&_gl=1*jp1afg*_ga*MTA0Mzg4MDI1NS4xNjExOTM0MDE2*_ga_6V4LCG72WC*MTYyMzA2MTMzNS42LjAuMTYyMzA2MTMzNS4w##RebexTotalPack.chm/Html/M_Rebex_Net_Ftp_KeepAliveAsync_1_d02429b3.htm


they use FTP NOOP commands and write the following:

Represents FTP NOOP command.

Call this if you do not want the connection to the server to time out.

Some servers ignore NOOP command.


Regards,
Stefan

Stefan, thanks for you reply!


However, that makes the keep-alive feature pretty useless then. 


Using NOOP that is ignored by many "modern" FTP server will just make users upset, as they have no idea why "your" keep-alive feature is not working and ultimately blame you. You should be using random commands instead, like sending CWD etc, which you can easily do yourself instead of relying on the keep-alive feature of the library. That would also give you a change of actually notifying the user in the bottom status-bar that a keep-alive command was/is being sent. 


Another thing that annoys users is the fact that if you edit a remote file and the connection gets killed while editing, TS Royal does not automatically re-upload the file any more. It just complains that the connection has been closed and gives you the option to re-connect. But even if you pick re-connect and re-save the file, it will not get uploaded. If would make a lot more sense that when it sense that a user saved the file after the connection has been disconnected, it will automatically re-connect and upload the file without any question. That would probably even remove the need for a keep-alive entirely.

Hi Daniele,


thanks a lot for the feedback. I understand your frustration and I totally agree. I have forwarded the feedback to the vendor rebex to see if they can improve the API. I know we could do it ourselves as well but to be honest, I would rather have it supported in the component and avoid creating additional background threads ourselves to make this work. It seems to be an easy fix and hope they can implement it. Worst case, we have to do it in Royal TS directly.


Regards,
Stefan

Login or Signup to post a comment