The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

log rotation broken?

Discussion in 'General Discussion' started by disgust, Apr 22, 2009.

  1. disgust

    disgust Member

    Joined:
    Nov 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I have it archive my logs in /logs/ for each user at the end of the day. each month seems to be getting its own gz file.

    for popular sites this doesn't seem to be adequate as many of them have log files well over 2GB in that time frame. the log "locks" when it hits 2gb.

    how would I change this to be done daily/weekly?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Have you considered enabling log rotation? You can do this for Apache-related logs in: WHM -> Service Configuration -> Apache Configuration -> Log Rotation.

    If you were referring to cPanel/WHM-related logs instead, please let me know.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Our built-in server log rotation is done when a log file reaches 300 MB. It is not done on a chronological basis.
     
  4. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Can you tell me what settings you have set for storing raw access logs daily, as I am unable to get this option to come up.
     
  5. disgust

    disgust Member

    Joined:
    Nov 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I'm referring to how cpanel/whm archives the apache logs.

    it takes the daily log and adds it to domain-month-year.gz in /logs/ in the user's home directory. every day the daily log is added onto the existing log within the gzip. however, the file in the gzip has hit 2gb and is no longer being added to.

    how can this be fixed?

    I'm referring to option in cpanel under "raw logs" and "archive logs in home directory"
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Ah, found what you are talking about.

    Assuming you're using the x3 theme - in the cPanel interface, in the Logs section click on Raw Access Logs. Near the top of the screen, there's a checkbox "Archive Logs in your home directory at the end of each stats run [ [every 1 day(s)]] ". Check that then click Save. That should keep the file sizes down.

    In the meantime, you still have 2+ GB files. Feel welcome to let our technical analysts assist you with that situation: http://tickets.cPanel.net/submit
     
  7. disgust

    disgust Member

    Joined:
    Nov 30, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    that's the problem. I DO have that checked. it appears that at the end of every day it's adding the daily log to site-april-2009.gz.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That file reaching 2GB should not be generating issues on a contemporary web server. I recommend letting our technical analysts take a look at your server so they can determine what is causing your server to encounter issues when this specific file exceeds 2 GB. You can contact our technical analysts at: http://tickets.cPanel.net/submit
     
Loading...

Share This Page