Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 1997 09:35:09 -0600 (MDT)
From:      Marc Slemko <marcs@znep.com>
To:        Michael Hallgren <hallgren@easynet.fr>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Apache won't take all vhosts
Message-ID:  <Pine.BSF.3.95.970814092950.25888E-100000@alive.znep.com>
In-Reply-To: <33F30486.9BB57621@easynet.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Aug 1997, Michael Hallgren wrote:

> Hello,
> 
> 
> I'm running Apache (1.1.3, patched to use one file for each vhost
> declaration), on
> FreeBSD 2.2.2.

1.1.3 is old.  Try 1.2.1.  It will probably fix your problem.

What do you mean patched to use one file for each virtualhost?  If you use
one log file (ie. not an access and error log per virtualhost) then it
will use one descriptor per virtual host, but I'm not sure why you have to
patch anything.

> 
> Apache starts normally w/o vhosts and with a limited quantity of vhosts.
> But above that quantity of vhosts, Apache's not starting up.

Well, it would help if you would say what this "some quantity" is.

> 
> The closest I've come tracking the source of my problem is that: 
> 
> range2: {371} % limits -e descriptors
> -e cannot be used with `cmd' option
> limits [-C class|-U user] [-eaSHBE] [-cdflmnstu [val]] [[name=val ...]
> cmd]
> range2: {372} % limits -e 
> limit cputime unlimited;
> limit filesize unlimited;
> limit datasize 131072;
> limit stacksize 65536;
> limit coredumpsize unlimited;
> limit memoryuse 32768;
> limit memorylocked unlimited;
> limit maxproc 64;
> limit descriptors 1024;
> range2: {373} %
> 
> 
> I'm suspecting the limit on "descriptors" of beeing the evil guy.
> Questions:
> 
> (1) Do you think I'm right?

Could be.

> 
> (2)  How do I change this parameter ?

See the OPEN_MAX kernel config parameter.  You can also partly adjust such
things with sysctl:

	kern.maxfiles: 2088
	kern.maxfilesperproc: 2088

You can also do something like "ulimit -n unlimited" (in a bourne shell;
you can figure out the syntax for csh if you want) before starting Apache,
which may increase them.  

However, the fact is that some of the name resolver routines are broken
and limited to 256 fds on 2.2 unless you recompile libc with a higher
FD_SETSIZE.  There is a little bit in the Apache FAQ about this.  Using
1.2.1 should work around this problem. 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970814092950.25888E-100000>