You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Hector <rh...@actrix.gen.nz> on 2002/11/26 09:19:31 UTC

[users@httpd] reload/restart apache with mod_perl

Hi all,

I'm relatively new to looking after apache.

I've been told by the previous admin of the site that it's probably not
a good idea to do a restart of apache (eg for logrotate) when using
mod_perl (and on this site, mason). 
To quote:

> restarting apache doesn't clear out perl's variables, and tends to
> cause memory leaks - the processes grow every time you restart,
> sometimes by 20M or more.

Is that the common view? He indicated the same for reload (SIGUSR1).

If so, I thought I would write a little program, borrowing ideas from
cronolog, that I pipe the log output through, and which closes and
reopens its output file when it gets a signal (thereby picking up the
new file created by logrotate).

Does this sound a reasonable plan?

I'm running on Debian 3.0 if that's significant.

Thanks,

Richard




---------------------------------------------------------------------
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] reload/restart apache with mod_perl

Posted by Richard Hector <rh...@actrix.gen.nz>.
On Tue, 2002-11-26 at 21:38, Issac Goldstand wrote:
> Just pipe the logs to rotatelogs from inside httpd.conf using the CustomLog
> directive, which allows you to log to a pipe - use the rotatelogs binary as
> this pipe...

OK. The rest of Debian uses logrotate, so in some ways I'd rather keep
that than replace it with rotatelogs. Mostly I just want to change as
little as possible.

But rotatelogs uses the same plan I was talking about, doesn't it? So I
can replace rotatelogs in the httpd.conf with my simpler program, and
HUP that from logrotate, which should achieve the same result.

Thanks,

Richard



---------------------------------------------------------------------
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] reload/restart apache with mod_perl

Posted by Issac Goldstand <ma...@beamartyr.net>.
Just pipe the logs to rotatelogs from inside httpd.conf using the CustomLog
directive, which allows you to log to a pipe - use the rotatelogs binary as
this pipe...

  Issac

----- Original Message -----
From: "Richard Hector" <rh...@actrix.gen.nz>
To: "Apache Users" <us...@httpd.apache.org>
Sent: Tuesday, November 26, 2002 10:19 AM
Subject: [users@httpd] reload/restart apache with mod_perl


> Hi all,
>
> I'm relatively new to looking after apache.
>
> I've been told by the previous admin of the site that it's probably not
> a good idea to do a restart of apache (eg for logrotate) when using
> mod_perl (and on this site, mason).
> To quote:
>
> > restarting apache doesn't clear out perl's variables, and tends to
> > cause memory leaks - the processes grow every time you restart,
> > sometimes by 20M or more.
>
> Is that the common view? He indicated the same for reload (SIGUSR1).
>
> If so, I thought I would write a little program, borrowing ideas from
> cronolog, that I pipe the log output through, and which closes and
> reopens its output file when it gets a signal (thereby picking up the
> new file created by logrotate).
>
> Does this sound a reasonable plan?
>
> I'm running on Debian 3.0 if that's significant.
>
> Thanks,
>
> Richard
>
>
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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