Too many open files

Matt Simonsen matt at careercast.com
Wed May 2 07:47:20 EST 2001


My company is running OpenSSH 2.5.1 (via inetd) on about 10 servers and over
time it appears that OpenSSH sessions are not being properly terminated on
the server. The basic symptom is that thousands of files are opened and not
being let go of as users close them, eventually taking us to the 4000 open
file limit. We did notice that the number of files bash is taking up are
relatively proportional to the number of SSH files, too.

I believe one of the root causes is users closing their SecureCRT session
via the windows X rather than typing "Exit," although I do not think this
should cause SSH sessions to stay open on the server.

I have seen on some online man pages with an IdleTimeout option (for the
OpenBSD version), although it does not appear to be included for the Linux
OpenSSH version I am using (nor is it in the man pages in my doc directory).
Is there some option that may help this problem, we are using the default
KeepAlive enabled. Second, any suggestions on how can I prevent this
behavior? Other than this everything is working very well, but it is causing
pretty serious problems and I don't think croning a daily killall -9 sshd is
really the answer.

Thanks
Matt Simonsen




More information about the openssh-unix-dev mailing list