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.

I don't want to logs to be kept anymore. How can I turn them off?

Discussion in 'General Discussion' started by Vatoloco, Jan 28, 2005.

  1. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I have a very busy site that I'm running on my server and I get e-mails like this all the time:

    Code:
    IMPORTANT: Do not ignore this email.
      This is cPanel stats runner on martha.myserver.com!
      While processing the log files for user myusername, the cpu has been 
    maxed out for more then a 6 hour period.  The current load/uptime line on the server at the time of 
    this email is
      06:28:21  up 2 days,  7:59,  0 users,  load average: 1.15, 0.79, 0.70
      You should check the server to see why the load is so high and take 
    steps to lower the load.  If you want stats to continue to run even with a high load; Edit 
    /var/cpanel/cpanel.config and change extracpus to a number larger then 0 (run 
    /usr/local/cpanel/startup afterwards to pickup the changes).
    I just don't want logs to be kept anymore. Namely the one under /etc/httpd/domlogs that, despite rotating, always seems to be many gigabytes.

    How can I turn off all logging? I know I'll lose alot of stats like bandwidth used and webalizer, but that's okay. I'm just trying to increase server performance and I'm sure if it's not constantly writing to log files that will help things out.
     
  2. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I did some searching and found that commenting out the following lines in /etc/httpd/conf/httpd.conf will stop the big ones, but I'm not sure if this is the correct way to stop all logging?

    BytesLog domlogs/yoursite.com-bytes_log
    CustomLog domlogs/yoursite.com combined
     
  3. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Hmm... you may want to just disable stats processing instead of logging altogether. Logging can help you trace problems and hacks, and 'what went wrong' type things, and it's not as significant a drain on resources as actually processing the logs into pretty images and succinct overviews.

    Search around for how to disable the stats for a site that cpanel does... I think I remember there being a way to do it.
     
  4. Jemshi

    Jemshi Well-Known Member

    Joined:
    Sep 11, 2003
    Messages:
    210
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    See my posts here http://forums.cpanel.net/showthread.php?t=35051
     
  5. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I don't have analog, awstats or webalizer checked in the WHM settings. I think those are the settings.

    Simply commenting out the BytesLog and CustomLog lines in httpd.conf has stopped all the nasty e-mails I've been getting. No more "apache failed. a restart was attempted automagically" e-mails either. I know I won't be able to trace problems, but honestly I've never found them useful for anything. I would rarely look at them and even when I have had some problems (like apache failing) and did take the time to look through them, nothing was out of the ordinary.
     
  6. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Oh, right... that would be what you'd do for stopping them on the entire server, in Tweak Settings. I thought you just wanted to stop them for the one domain.

    Well, it's obviously up to you... but maybe you should consider adding proper log rotation to your httpd logs so they don't get so big and cause trouble. There's instructions for adding rules for logrotate floating around somewhere. A search ought to find them. Perhaps weekly, or even daily would be better than monthly - which is the default if I'm thinking of the right settings.
     
Loading...

Share This Page