SFTP sessions not closing

jperreault's Avatar

jperreault

29 Feb, 2016 07:30 PM

Hello,

Lately we've been having a small issue with FTP sessions not closing once they are complete. In our transports, we have a special user for cascade to upload files to the webserver. However, lately some of those sessions aren't closing and are hanging around for months.

Are there any Cascade Server settings to control this ? Maybe I have to look on the webserver side ?

THanks,

Jeff

root       971  3240  0 Jan05 ?        00:00:00 sshd: cascade [priv]
cascade1   973   971  0 Jan05 ?        00:00:25 sshd: cascade@notty
cascade1    974   973  0 Jan05 ?        00:00:00 /usr/libexec/openssh/sftp-server
root      5956  3240  0 Feb22 ?        00:00:00 sshd: cascade [priv]
cascade1   5958  5956  0 Feb22 ?        00:00:03 sshd: cascade@notty
cascade1   5959  5958  0 Feb22 ?        00:00:00 /usr/libexec/openssh/sftp-server
root      8335  8271  0 11:26 pts/1    00:00:00 grep cascade
root      8718  3240  0 Jan18 ?        00:00:00 sshd: cascade [priv]
root      8720  3240  0 Jan18 ?        00:00:00 sshd: cascade [priv]
cascade1   8722  8718  0 Jan18 ?        00:00:14 sshd: cascade@notty
cascade1   8723  8722  0 Jan18 ?        00:00:00 /usr/libexec/openssh/sftp-server
cascade1   8729  8720  0 Jan18 ?        00:00:14 sshd: cascade@notty
root      8773  3240  0 Jan18 ?        00:00:00 sshd: cascade [priv]
cascade1   8798  8773  0 Jan18 ?        00:00:16 sshd: cascade@notty
root      9356  3240  0 Feb04 ?        00:00:00 sshd: cascade [priv]
cascade1   9358  9356  0 Feb04 ?        00:00:09 sshd: cascade@notty
root      9365  3240  0 Jan11 ?        00:00:00 sshd: cascade [priv]
cascade1   9367  9365  0 Jan11 ?        00:00:21 sshd: cascade@notty
cascade1   9368  9367  0 Jan11 ?        00:00:00 /usr/libexec/openssh/sftp-server
root     14455  3240  0 Feb23 ?        00:00:00 sshd: cascade [priv]
cascade1  14457 14455  0 Feb23 ?        00:00:02 sshd: cascade@notty
cascade1  14458 14457  0 Feb23 ?        00:00:00 /usr/libexec/openssh/sftp-server
root     14958  3240  0 Feb26 ?        00:00:00 sshd: cascade [priv]
cascade1  14960 14958  0 Feb26 ?        00:00:01 sshd: cascade@notty
. . .
  1. Support Staff 1 Posted by Tim on 29 Feb, 2016 07:45 PM

    Tim's Avatar

    Hi Jeff,

    I suspect this may be due to an issue that we're currently aware of where SFTP initialization retries (after a failed attempt, for example) will leave a connection open to the server. I don't have an estimate as to when this will be corrected, but I can certainly comment back on this discussion once it has been addressed.

    In the meantime, feel free to kill those older threads that you're seeing. As you mentioned, there may be a setting in your SFTP server to end threads any time a particular timeout has been reached.

    Let me know if you have any additional questions.

    Thanks!

  2. 2 Posted by jperreault on 29 Feb, 2016 08:01 PM

    jperreault's Avatar

    Hi Tim,

    Thanks for your quick response. I've killed all the old sessions now. There were only about 25 old sessions, and in a month we probably publish thousands of times so it only happens rarely. I would not have noticed except that our monitoring system started warning at the number of processes.

    I'm going to try updating the SSH keep-alive settings to 3 x 600 seconds as suggested in this discussion :

    http://serverfault.com/questions/203289/there-seems-to-be-some-ling...

    I'll check again in a couple of weeks to see if any new sessions are sill lingering.

    Thanks,

    Jeff

  3. Support Staff 3 Posted by Tim on 29 Feb, 2016 08:05 PM

    Tim's Avatar

    That sounds good, Jeff. Based on what you mentioned about how rarely it appears to be occurring, that does seem to go along with the bug I mentioned since the open connections there are only happening when there is a failure associated with the initialization of the SFTP service .

    I'll go ahead and close the discussion for now, but don't hesitate to comment back if you find that it starts happening more regularly. Otherwise, I can let you know here once we've addressed the bug I mentioned.

    Have a good one!

  4. Tim closed this discussion on 29 Feb, 2016 08:05 PM.

Comments are closed, but you can start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac