[PLUG] Linux Terminal Server... too many open files?

Jason Dagit dagit at engr.orst.edu
Thu Aug 1 17:43:06 UTC 2002


On 31 Jul 2002, Karl M. Hegbloom wrote:

> Matt Alexander <m at netpro.to> writes:
>
> > I'm running a couple Linux Terminal Servers (http://k12ltsp.org) at
> > work with about 24 users per server.  Occasionally users are not
> > able to launch programs or do much else because the system reports
> > that there are currently too many open files.  Is there a
> > system-wide variable somewhere that I can modify to increase the
> > maximum number of open files?
>
> I think you can "echo NNNN > /proc/sys/fs/file-max", or, if your disto
> uses "sysctl", edit "/etc/sysctl.conf" and set it there, then run
> "sysctl -p".

That may be a solution for now, but I wouldn't be surprised if there is a
bug in one or more of the programs you use that causes it to consume more
file descriptors than it should.

One way to test this would be to randomly kill processes when this
happens.  Of course, an even better approach would be to write a perl
script that ever so often tries to open a file.  If it fails with the
error code you mention then it saves some accounting information about the
machine to a log file.  Then you compare things like netstat, ps, and I
think there are commands for listing information about file descriptors.

It very well could be that the sheer number of users is causing the
problem, but it seems odd to me...

HTH,
Jason





More information about the PLUG mailing list