newsyslog and apache

Garance A Drosihn drosih at rpi.edu
Mon Mar 22 18:38:00 PST 2004


At 5:19 PM -0800 3/22/04, Noah wrote:
>
>I ask that you please be specific as to what you think is wrong
>with my newsyslog.conf file because I cant seem to figure out
>what you are talking about here?  Looks like my newsyslog.conf
>file matches the recommended config:

Hi.

I do not run apache at all, but I am the guy who has done the
most-recent work on the newsyslog command.

If I were to guess, I think your problem might be that you end
up sending multiple USR1 signals to apache.  I haven't looked
at the code recently, but I think the freebsd newsyslog still
does not optimize the number of signal's that it sends to a
single process.

What I would suggest you try is some kind of staggered setup.
(it's an easy thing to try...).  Something like:

.../www.domain1.com/access_log  640 30  *  @T00  ZN
.../www.domain1.com/error_log   640 30  *  @T00  Z  /var/run/httpd.pid 30
.../www.domain2.org/access_log  640 30  *  @T02  ZN
.../www.domain2.org/error_log   640 30  *  @T02  Z  /var/run/httpd.pid 30
.../www.domain3.com/access_log  640 30  *  @T04  ZN
.../www.domain3.com/error_log   640 30  *  @T04  Z  /var/run/httpd.pid 30

(the ...'s are just an attempt to avoid line-wrapping in this
message.  you still want the full pathname in the control file)

The idea is to rotate the log-and-error files for any one domain
at the same time, and only specify the pid once for that group.
And then wait two minutes between the files for each domain name.

See if that helps you at all.

-- 
Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu


More information about the freebsd-questions mailing list