Mailing List Archive

Limit on Virtual Hosts (fwd)
This has been asked in c.i.www.s.unix too,

Forwarded message:
> From rfreilic@hookup.net Mon Aug 28 12:24:48 1995
> Message-Id: <199508281924.PAA23947@noc.tor.hookup.net>
> Date: Mon, 28 Aug 95 15:33:48 -0400
> From: Richard Freilich <rfreilic@hookup.net>
> Organization: HookUp Communications
> X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
> MIME-Version: 1.0
> To: apache-bugs@apache.org, rfreilic@hookup.net
> Subject: Limit on Virtual Hosts
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain; charset=us-ascii
>
> Is the limit on Virtual Hosts a bug in the server, or is there something
> I'm overlooking?
>
> As far as I can tell, each Virtual Host takes up 2 file descriptors (one
> for error_log and one for access_log), so when your system runs out of
> file descriptors, you are at your max on Virtual Hosts. If you give all
> of your Virtual Hosts identical log names, the server will open a
> different copy of the file for each Host you have declared.
>
> Is this a bug, or is there a way of changing this that I'm not aware of?
>
>
> Richard Freilich
> WEBmaster
> HookUp Communications
> Ontario, Canada
>
>
>
Re: Limit on Virtual Hosts (fwd) [ In reply to ]
It would be relatively easy to add a setrlimit() call for
BSD machines in pfopen(). Not sure if we want to raise the
limit for every call to pfopen() or if we need to bump it
in larger chunks somewhere else. Thoughts?

I assume the same (or similar call exists on SysV?)


>
> This has been asked in c.i.www.s.unix too,
>
> Forwarded message:
> > From rfreilic@hookup.net Mon Aug 28 12:24:48 1995
> > Message-Id: <199508281924.PAA23947@noc.tor.hookup.net>
> > Date: Mon, 28 Aug 95 15:33:48 -0400
> > From: Richard Freilich <rfreilic@hookup.net>
> > Organization: HookUp Communications
> > X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
> > MIME-Version: 1.0
> > To: apache-bugs@apache.org, rfreilic@hookup.net
> > Subject: Limit on Virtual Hosts
> > Content-Transfer-Encoding: 7bit
> > Content-Type: text/plain; charset=us-ascii
> >
> > Is the limit on Virtual Hosts a bug in the server, or is there something
> > I'm overlooking?
> >
> > As far as I can tell, each Virtual Host takes up 2 file descriptors (one
> > for error_log and one for access_log), so when your system runs out of
> > file descriptors, you are at your max on Virtual Hosts. If you give all
> > of your Virtual Hosts identical log names, the server will open a
> > different copy of the file for each Host you have declared.
> >
> > Is this a bug, or is there a way of changing this that I'm not aware of?
> >
> >
> > Richard Freilich
> > WEBmaster
> > HookUp Communications
> > Ontario, Canada
> >
> >
> >
Re: Limit on Virtual Hosts (fwd) [ In reply to ]
From: Rob Hartill <hartill@hyperreal.com>
Date: Mon, 28 Aug 1995 22:56:31 -0700 (PDT)

> This has been asked in c.i.www.s.unix too,
>
> Forwarded message:
> > From rfreilic@hookup.net Mon Aug 28 12:24:48 1995
> > Message-Id: <199508281924.PAA23947@noc.tor.hookup.net>
> > Date: Mon, 28 Aug 95 15:33:48 -0400
> > From: Richard Freilich <rfreilic@hookup.net>
> > Organization: HookUp Communications
> > X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
> > MIME-Version: 1.0
> > To: apache-bugs@apache.org, rfreilic@hookup.net
> > Subject: Limit on Virtual Hosts
> > Content-Transfer-Encoding: 7bit
> > Content-Type: text/plain; charset=us-ascii
> >
> > Is the limit on Virtual Hosts a bug in the server, or is there something
> > I'm overlooking?
> >
> > As far as I can tell, each Virtual Host takes up 2 file descriptors (one
> > for error_log and one for access_log), so when your system runs out of
> > file descriptors, you are at your max on Virtual Hosts. If you give all
> > of your Virtual Hosts identical log names, the server will open a
> > different copy of the file for each Host you have declared.
> >
> > Is this a bug, or is there a way of changing this that I'm not aware of?

If he doesn't specify ErrorLog at all (rather than giving them the
same name) apache won't open the file multiple times.

However, open_logs() should really check for duplicate filenames, and only
open each file once.

David.
Re: Limit on Virtual Hosts (fwd) [ In reply to ]
From: Rob Hartill <hartill@hyperreal.com>
Date: Mon, 28 Aug 1995 22:56:31 -0700 (PDT)

> This has been asked in c.i.www.s.unix too,
>
> Forwarded message:
> > From rfreilic@hookup.net Mon Aug 28 12:24:48 1995
> > Message-Id: <199508281924.PAA23947@noc.tor.hookup.net>
> > Date: Mon, 28 Aug 95 15:33:48 -0400
> > From: Richard Freilich <rfreilic@hookup.net>
> > Organization: HookUp Communications
> > X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
> > MIME-Version: 1.0
> > To: apache-bugs@apache.org, rfreilic@hookup.net
> > Subject: Limit on Virtual Hosts
> > Content-Transfer-Encoding: 7bit
> > Content-Type: text/plain; charset=us-ascii
> >
> > Is the limit on Virtual Hosts a bug in the server, or is there something
> > I'm overlooking?
> >
> > As far as I can tell, each Virtual Host takes up 2 file descriptors (one
> > for error_log and one for access_log), so when your system runs out of
> > file descriptors, you are at your max on Virtual Hosts. If you give all
> > of your Virtual Hosts identical log names, the server will open a
> > different copy of the file for each Host you have declared.
> >
> > Is this a bug, or is there a way of changing this that I'm not aware of?

If he doesn't specify ErrorLog at all (rather than giving them the
same name) apache won't open the file multiple times.

However, open_logs() should really check for duplicate filenames, and only
open each file once.

David.