Re: too many open files?
Might want to look into the following settings for Apache.
# Server-pool size regulation. Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. These values are probably OK for most sites ---
# Number of servers to start --- should be a reasonable ballpark figure.
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# Unix with it as it spirals down...
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.
# The child will exit so as to avoid problems after prolonged use when
# Apache (and maybe the libraries it uses) leak. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries.
On Mon, 11 Nov 1996, Ricardo Kleemann wrote:
> Date: Mon, 11 Nov 1996 08:07:33 -0800
> From: Ricardo Kleemann <firstname.lastname@example.org>
> To: Oskar Pearson <email@example.com>
> Cc: Debian Users list <firstname.lastname@example.org>,
> Linux Kernel <email@example.com>
> Subject: Re: too many open files?
> Thanks for the help!!!
> So now I'm puzzled! :(
> here are my values:
> irvine:/$ cat /proc/sys/kernel/file-nr
> irvine:/$ cat /proc/sys/kernel/inode-nr
> 1680 1502
> irvine:/$ cat /proc/sys/kernel/file-max
> irvine:/$ cat /proc/sys/kernel/inode-max
> I'm only running about 15 virtual WWW domains from apache,
> but when I run httpd, it reports the "too many open files" error! :(
> How can it be if before running it, there are only 192 open?
> Thanks again,
> On Mon, 11 Nov 1996, Oskar Pearson wrote:
> > Hi
> > > I tried running apache and got back the "too many open files" error.
> > There are generally two possible errors:
> > You can have too many files open on your system (say you have lots of programs
> > that are opening a few files each)
> > or a single process (like apache) can open 256 files (this is the default
> > value)
> > The one you can increase on the fly, the other not.
> > To increase the total number that you can open on the system, you can
> > "echo" values to various files in /proc (assuming you are running 2.0.latest)
> > > How can I check/monitor the number of file descriptors being used??
> > cat /proc/sys/kernel/file-nr (maximum Overall open files on system opened)
> > cat /proc/sys/kernel/inode-nr (maximum Overall open inodes on system opened)
> > cat /proc/sys/kernel/file-max (maximum files on the system that can be opened
> > concurrently)
> > cat /proc/sys/kernel/inode-max (maximum inodes on the system that can be opened
> > concurrently)
> > > Where do I change it if it needs to be increased?
> > If you want to increase the files per process, have a look at
> > http://www.linux.org.za/tweak.html (Yes, I know that it is almost the only
> > thing on the server :(
> > If you want to increase the number of maximum open files (ie the value
> > in file-max is the same as the value in file-nr) you can echo values as
> > follows:
> > echo "4096" >/proc/sys/kernel/file-max
> > echo "12288" >/proc/sys/kernel/inode-max
> > (inode-max's value is almost allways 3 times the size of file-max, keep it that
> > way!)
> > Oskar
> > --
> > TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> > debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com