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.

Is cpanel log rotation ever works?

Discussion in 'General Discussion' started by sharmaine001, Dec 15, 2009.

  1. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    I have set up error logs to rotate here: Main >> Service Configuration >> Apache Configuration >> Log Rotation

    When you open this link, this is what cpanel tells us:

    I made sure I checked them all, including error logs.

    This has been the set up since I installed cpanel more than 4 months ago.

    Now I go to /usr/local/apache/logs/ and error_log is not being rotated. Its already 579MB.

    Is cpanel log rotation in WHM ever works?
     
  2. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What is your full cPanel version number?
     
  3. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Im using 11.25. I didnt check if this was working in the old version 11.24

    cPanel 11.25.0-C42048 - WHM 11.25.0 - X 3.9
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please submit a ticket for this issue; the feature is known to work but I suspect something is interfering that may be causing the difficulty being experienced. When available, please PM me referencing this thread and your new ticket ID number so I may follow-up internally.
     
  5. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    Okay will do. Thanks
     
  6. hillbilly1980

    hillbilly1980 Member

    Joined:
    Apr 25, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I was just changing backups today and noticed one of my servers had not be set to rotate it's apache and cpanel logs.

    From experience cPanel has never done a good job of log rotation, ( sorry guys, you know it's true). On Freebsd you have to add the following lines to your /etc/newsyslog.conf file.

    I was wondering though if there is a pid file for the cpanel webserver generating the logs in /usr/local/cpanel/logs, i'de like newsyslog to give it a signal.




    /usr/local/apache/logs/access_log 640 7 * @T00 B /usr/local/apache/logs/httpd.pid 30
    /usr/local/apache/logs/error_log 640 7 * @T00 B /usr/local/apache/logs/httpd.pid 30
    /usr/local/apache/logs/suexec_log 640 7 * @T00 B /usr/local/apache/logs/httpd.pid 30
    /usr/local/cpanel/logs/error_log 640 7 * @T00 B
    /usr/local/cpanel/logs/access_log 640 7 * @T00 B
    /usr/local/cpanel/logs/stats_log 640 7 * @T00 B
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    "cPanel Log Rotation and Apache Log Rotation as configured in WHM are not enabled by default; they are optional features and would need to be enabled via WHM."
    Corrected information: The features cPanel Log Rotation and Apache Log Rotation as configured in WHM may not be enabled by default depending on the version of cPanel installed (e.g., disabled by default in 11.24 as described by cPanelKenneth); they are optional features and, if not activated, would need to be enabled via WHM.

    Related Documentation:
    WHM: Main >> Service Configuration >> Apache Configuration >> Log Rotation
    WHM: Main >> Service Configuration >> cPanel Log Rotation Configuration

    If it helps with the customization being performed, as a start you may look at the PID of "cpsrvd".
     
    #7 cPanelDon, Jan 11, 2010
    Last edited: Jan 12, 2010
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    This was actually a bug introduced in 11.24. We recently fixed this so by default cPanel and Apache service logs will be rotated. This fix is slated for inclusion in 11.25.
     
  9. ikillbill

    ikillbill Well-Known Member

    Joined:
    Feb 18, 2008
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    EA is disabled with log rotation ENABLED

    no issue so far these days

    however, could we get older EA version back on easyapache?

    we do need EA back

    thank
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To help minimize any confusion I've updated my original post per the above clarification.

    I believe that may be for a different issue, unrelated to cPanel/Apache Log Rotation.
     
  11. sharmaine001

    sharmaine001 Well-Known Member

    Joined:
    Jun 23, 2006
    Messages:
    143
    Likes Received:
    0
    Trophy Points:
    16
    I am already using 11.25 and log rotation are all checked in WHM but they dont work
     
  12. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Are any of the applicable log files 300 MB or larger in size (disk usage)?

    The following two commands will help to verify (by viewing a directory listing):
    Code:
    # ls -ahl /usr/local/apache/logs /usr/local/apache/logs/archive
    # ls -ahl /usr/local/cpanel/logs /usr/local/cpanel/logs/archive
    The sub-directory "archive" is created the first time a log file is rotated by cpanellogd (e.g., when a log file reaches 300 MB in size).
     
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    At this time they are only in 11.25 EDGE.
     
Loading...

Share This Page