Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 16:22:02

Author Topic: Log rotate causes Error 502 each day at the same time  (Read 8961 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Can you check this out? It's really annoying.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Log rotate causes Error 502 each day at the same time
« Reply #1 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.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: Log rotate causes Error 502 each day at the same time
« Reply #2 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

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.041 seconds with 23 queries.

web stats analysis