Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    18

    Default log rotation broken?

    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. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by disgust View Post
    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?
    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. #3
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by ChrisRHS View Post
    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.
    Our built-in server log rotation is done when a log file reaches 300 MB. It is not done on a chronological basis.

  4. #4
    Member
    Join Date
    Jul 2006
    Posts
    285

    Default

    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. #5
    Member
    Join Date
    Nov 2005
    Posts
    18

    Default

    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. #6
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by disgust View Post
    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"
    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. #7
    Member
    Join Date
    Nov 2005
    Posts
    18

    Default

    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.
    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. #8
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by disgust View Post
    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.
    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

Similar Threads & Tags
Similar threads

  1. Log Rotation?
    By dragon2611 in forum Security
    Replies: 0
    Last Post: 06-04-2010, 03:40 PM
  2. Log Rotation
    By zigzam in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-02-2009, 08:06 AM
  3. Log rotation
    By bmcclure in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-18-2003, 10:53 AM
  4. Log Rotation
    By sketchified in forum cPanel and WHM Discussions
    Replies: 43
    Last Post: 12-10-2002, 10:02 AM
  5. Log Rotation?
    By Curious Too in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-02-2002, 01:01 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube