You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Tobias Glasow <tg...@magnet.ch> on 2004/01/19 18:29:17 UTC

[users@httpd] large number of vhosts

hi all,

i have an openbsd 3.4 system with apache 1.3.28 working on it. at the 
end of the httpd conf i include 2 config files with vhost config. the 
first containing 260 hosts and the 2nd containing 510 hosts.

when including just one of these files (no matter which one) everything 
is working fine. but when including both, apache starts up as normal (no 
errors msg) but apache is not answering request. in lynx just saying 
"network error".

any ideas?

regards from switzerland.
-- 
Mit freundlichen Grüssen,
Tobias Glasow
----------------------------------------------------------
Magnet.ch AG
Güterstrasse 86
CH-4053 Basel
T 0842 420 420
F 0842 420 422
eMail: t.glasow@magnet.ch
WWW: http://www.magnet.ch
----------------------------------------------------------
Magnet.ch AG - Ihr unabhängiger Internet Provider
----------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] large number of vhosts

Posted by Robert Andersson <ro...@profundis.nu>.
Tobias Glasow wrote:
> yes, this is what i now see in the error log. but what can i do, do have
> individual logfiles?

You could increase the file descriptors, but I feel to rusty to suggest how
for your platform (I have had no need myself).

But, when having a large number of hosts (> 100) you should in most cases
avoid having individual logging. Many people log to a single log file (or
pipe them) and include the name of the host in each log line, then run a
cron job (eg. once a day) that splits the logs based on that host name. See:
    http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#formats

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] large number of vhosts

Posted by Jez Hancock <je...@munk.nu>.
On Tue, Jan 20, 2004 at 12:10:45PM +0100, Tobias Glasow wrote:
> Hi Rob,
> 
> yes, this is what i now see in the error log. but what can i do, do have 
> individual logfiles?
You could pipe your log entries to a script which then logs the entry to
a file depending on the name of the vhost.  This way you only need one
single process to handle all the logging.

There's a description of the method on my blog together with a sample
perl logging script:

http://jez.hancock-family.com/index.php?/archives/28_Apache_Custom_VirtualHost_Virtual_Domain_Logging_Using_Perl_and_FIFOs.html

There are also a few other entries about apache logging, especially
using FIFOs which would be more advisable if you have a large number of
vhosts.

Unfortunately this method can't be used for error logs afaik - if anyone
knows of a method to log error logs in a similar manner I'd be happy to
hear about it - at the moment I'm using cronolog which eats up 2 fds for
each vhost.

Cheers.

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - Another FreeBSD Diary
http://ipfwstats.sf.net/        - ipfw peruser traffic logging

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] large number of vhosts

Posted by Tobias Glasow <tg...@magnet.ch>.
Hi Rob,

yes, this is what i now see in the error log. but what can i do, do have 
individual logfiles?

Regards,
Tobias Glasow

Robert Andersson wrote:
> Tobias Glasow wrote:
> 
>>the first containing 260 hosts and the 2nd containing 510 hosts.
>>
>>when including just one of these files (no matter which one) everything
>>is working fine. but when including both, apache starts up as normal (no
>>errors msg) but apache is not answering request. in lynx just saying
>>"network error".
> 
> 
> If you have individual access and/or error logs for all those host, you
> might be running out of file descriptors.
> 
> Regards,
> Robert Andersson
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

-- 
Mit freundlichen Grüssen,
Tobias Glasow
----------------------------------------------------------
Magnet.ch AG
Güterstrasse 86
CH-4053 Basel
T 0842 420 420
F 0842 420 422
eMail: t.glasow@magnet.ch
WWW: http://www.magnet.ch
----------------------------------------------------------
Magnet.ch AG - Ihr unabhängiger Internet Provider
----------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] large number of vhosts

Posted by Robert Andersson <ro...@profundis.nu>.
Tobias Glasow wrote:
> the first containing 260 hosts and the 2nd containing 510 hosts.
>
> when including just one of these files (no matter which one) everything
> is working fine. but when including both, apache starts up as normal (no
> errors msg) but apache is not answering request. in lynx just saying
> "network error".

If you have individual access and/or error logs for all those host, you
might be running out of file descriptors.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org