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

Re: apache & log files



Marek Podmaka wrote:

Hello,

 I have apache 1.3 webserver hosting about 150 domains (more than 400
 virtual hosts). Now I have separate error log for each domain
 (something.sk) and separate combined log for each virtual host (for
 example www.abcq.sk and new.abcq.sk). This has many positives for
 me: easy to find some data related to each virtual host and that I
 can make seaparate statistics for each virtual host. I use awstats.
 And now the bad side - the number of open files in each apache
 process is more than 500 just for these log files. It's no problem
 for now, but with more domains in future it will hit the 1024 per
 process limit of open files.

 And now the questions :)
 1) Where does that 1024 open files limit come from? Is it somewhere
 configurable? Or do you think it's totally bad idea to have such
 number of log files?

 2) Is it possible to have separate statistics for each virtual host
 with awstats and only one log file? It would be nice if certain
 virtual hosts could have different configuration of awstats. Now I
 use my script which checks all virtual hosts in mysql (from where
 also the apache config is refreshed every 15 mins) and creates
 config file for awstats if none exists. Then it runs awstats for
 each config (one after another of course).

 3) Or you maybe use some other solution to this problem?
Check out Cronolog. Piping your logs to that would at least get them into another process!

Apache 2 config would be:

   CustomLog "| /path/to/cronolog /path/to/logfile_%Y_%m.log" combined

Would that help you? Dunno if it scales to the levels you need - just an idea.

Regards, Upayavira



Reply to: