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. 2018-11-15, 11:35:43

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

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

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

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 3,962
  • 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: 3,962
  • 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 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.054 seconds with 23 queries.

web stats analysis