Re: 2000 vHosts and indiviual access logs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Aug 14, 2007, at 8:22 AM, Samuel Vogel wrote:

Hey,

I'm just tried to setup my Apache with 2000 vHosts and it was my Idea to give them seperate access logs. But Apache complains about opening too many files. I know this is restriction linux puts on the users, but I don't know how to change this...

set ulimit -n from the calling shell. For instance, put a call to ulimit into the script that starts Apache for you. My kernel shows that the hard limit (ulimit -n -H) is 1024, which is too small for you.

Also I would like to know if so opening so many different files will slow Apache down significantly?

Aside from the fact that it won't work at all on a default kernel (not sure where you would tweak this in the kernel source), yes this will likely negatively affect performance.

The usual approach is to write one log file for all virtual hosts and put the %v descriptor in front of the regular log format line. Then, after you rotate the logfile, run a simple script that explodes the single log into individual files per vhost. See support/split- logfile under your source download for an example.

S.

--
Sander Temme
sctemme@xxxxxxxxxx
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux