MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Bugs and Requests => Topic started by: Spacedust on 2017-10-27, 11:55:22

Title: Log rotate causes Error 502 each day at the same time
Post by: Spacedust on 2017-10-27, 11:55:22
Can you check this out? It's really annoying.
Title: Re: Log rotate causes Error 502 each day at the same time
Post by: Spacedust on 2017-10-28, 22:30:55
It's because logrotate starts sh /script/restart-web --force >/dev/null 2>&1 which is pointless. It causes about 1-2 seconds downtime of the whole web server.
Title: Re: Log rotate causes Error 502 each day at the same time
Post by: Spacedust on 2017-10-30, 14:16:12
Corrected /etc/logrotate.d/kloxo file:

Quote
# Kloxo LogRotate
# Initial version
# Needs cleanup
# Using this one on LxCenter server
# Created by Danny Terweij <d.terweij@lxcenter.org>
#
# Daily rotates (compressed) and keeps maximum of 30 days
#
# add and modified by Mustafa Ramadhan <mustafa.ramadhan@lxcenter.org>

/home/httpd/*/stats/*_log
/home/*/__processed_stats/*_log
## MR -- disable for kloxo because using fixlogdir in scavenge
#/usr/local/lxlabs/kloxo/log/*
#/usr/local/lxlabs/kloxo/processed_log/*
{
    daily
    #create 0664 apache apache
    #rotate 52
    compress
    delaycompress
    notifempty
    missingok
    sharedscripts
    postrotate
#       sh /script/restart-web -y >/dev/null 2>&1 || true
        sh /script/restart -y >/dev/null 2>&1 || true
    endscript