You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jurgen <ap...@squarehosting.com> on 2002/12/13 17:20:44 UTC

[users@httpd] cron jobs kill apache

Hi everybody,

on one of my servers I have an apache 1.3.26 running, which works just fine the way it should.
The problem occurs when a cron job starts logrotate and attempts to rotate the log file.
In the body of the logrotate configuration file I have the following:

rotate 5
size=20M
sharedscripts
postrotate
  /usr/bin/killall -HUP httpd
endscript

After the logs are rotated the server is not running anymore. There is no new access_log unless I start the server again by hand.
One thing I am not sure about, but I have the impression that it works that way is, that it works fine one night, but the second time logs are rotated apache is down.
Did this happen to anyone else or does anybody have an idea where this is coming from?

Thank you
Jurgen

---------------------------------------------------------------------
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] cron jobs kill apache

Posted by Jurgen <ap...@squarehosting.com>.
Thanks a lot Jacob. It looks as if this is exactly the point.

Jurgen


On Fri, 13 Dec 2002 11:34:05 -0500
"Jacob Coby" <jc...@listingbook.com> wrote:

> > Ummm...I would read the man on killall. you are basically telling the OS
> > to kill apache! If you do not tell it to restart it, then, well, apache
> > will be down.
> 
> Actually, the problem is that apache isn't getting the signal, he needs to
> pass in the full path:
> 
> /usr/bin/killall -HUP /usr/local/apache/bin/httpd
> 
> > I would suggest using the init.d script and sending a 'reload' or
> > 'graceful' signal which will force Apache to reread the configs and
> > reopen the inode on the logs.
> 
> HUP is reload, USR1 is graceful.
> 
> -Jacob
> 
> 
> ---------------------------------------------------------------------
> 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


Re: [users@httpd] cron jobs kill apache

Posted by Jacob Coby <jc...@listingbook.com>.
> Ummm...I would read the man on killall. you are basically telling the OS
> to kill apache! If you do not tell it to restart it, then, well, apache
> will be down.

Actually, the problem is that apache isn't getting the signal, he needs to
pass in the full path:

/usr/bin/killall -HUP /usr/local/apache/bin/httpd

> I would suggest using the init.d script and sending a 'reload' or
> 'graceful' signal which will force Apache to reread the configs and
> reopen the inode on the logs.

HUP is reload, USR1 is graceful.

-Jacob


---------------------------------------------------------------------
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] cron jobs kill apache

Posted by Ben Ricker <br...@wellinx.com>.
Ummm...I would read the man on killall. you are basically telling the OS
to kill apache! If you do not tell it to restart it, then, well, apache
will be down.

I would suggest using the init.d script and sending a 'reload' or
'graceful' signal which will force Apache to reread the configs and
reopen the inode on the logs.

Ben Ricker


On Fri, 2002-12-13 at 10:20, Jurgen wrote:
> Hi everybody,
> 
> on one of my servers I have an apache 1.3.26 running, which works just fine the way it should.
> The problem occurs when a cron job starts logrotate and attempts to rotate the log file.
> In the body of the logrotate configuration file I have the following:
> 
> rotate 5
> size=20M
> sharedscripts
> postrotate
>   /usr/bin/killall -HUP httpd
> endscript
> 
> After the logs are rotated the server is not running anymore. There is no new access_log unless I start the server again by hand.
> One thing I am not sure about, but I have the impression that it works that way is, that it works fine one night, but the second time logs are rotated apache is down.
> Did this happen to anyone else or does anybody have an idea where this is coming from?
> 
> Thank you
> Jurgen
> 
> ---------------------------------------------------------------------
> 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
-- 
Ben Ricker <br...@wellinx.com>
Wellinx.com


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