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.

Domlogs corrupted when file reach 2gig

Discussion in 'General Discussion' started by jean louis, May 19, 2005.

  1. jean louis

    jean louis Member

    Joined:
    Dec 18, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    WHM 10.1.0 cPanel 10.2.0-R82
    my server dual xeon 2.4 with 1gig ram
    i want to know the mod to make the domlogs rotate and gzip every 15 days instead once a momth because it seems the server got a problem to deal with domlogs up to 2 gigs
    i do not know what is the bug but i soon as the domlogs get corrupted i can see with top a lot of process from "nobody" getting "zombie " defunct
    Any idea ?
    the only solution i found to reset the domlogs corrupted is to gzip the domlogs direstly from the domlogs directory and rebuild apache
    do i have to change manually my httpd.conf setup?
     
    #1 jean louis, May 19, 2005
    Last edited: May 19, 2005
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    IT's apache that cannot cope with log files of more than 2GB. You should either look at adding a rule to logrotate.d or simply select the option WHM > Tweak Settings > Delete each domain's access logs after stats run, but be aware of the implications.
     
  3. jean louis

    jean louis Member

    Joined:
    Dec 18, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I am a newbie
    can you explain?
    "at adding a rule to logrotate.d"
    Tahnk you
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You need to read up on how logrotate works. A good start would be:

    man logrotate

    And have a look in the existing files in /etc/logrotate.d/* for guidance. Also try searching the forums for logrotate.d
     
  5. jean louis

    jean louis Member

    Joined:
    Dec 18, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    If i change my logrotate

    ------------------------------------- my actual setup
    # see "man logrotate" for details
    # rotate log files weekly
    weekly

    # keep 4 weeks worth of backlogs
    rotate 4

    # create new (empty) log files after rotating old ones
    create

    # uncomment this if you want your log files compressed
    #compress

    # RPM packages drop log rotation information into this directory
    include /etc/logrotate.d

    # no packages own wtmp -- we'll rotate them here
    /var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
    }

    # system-specific logs may be also be configured here.
    ---------------------------
    to this

    # see "man logrotate" for details
    # rotate log files when they reach 1024M
    size 1024M


    # keep 4 weeks worth of backlogs
    rotate 4

    # create new (empty) log files after rotating old ones
    create

    # uncomment this if you want your log files compressed
    #compress

    # RPM packages drop log rotation information into this directory
    include /etc/logrotate.d

    # no packages own wtmp -- we'll rotate them here
    /var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 1
    }

    # system-specific logs may be also be configured here.
    ----------------------
    do that solve my 2 gig apache problem?? i just want to be sure before messing around
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, you would have to create a file specifically for the domlogs in /etc/logrotate.d/ however, the best way to resolve the issue is to select that option in WHM I mentioned, that's what it is for.
     
  7. jean louis

    jean louis Member

    Joined:
    Dec 18, 2003
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    the problem for me to use the whm option is it download the my web log (gzipped) every month for a better analyse on 123 log analyser on my pc , if i choose the option:
    Delete each domain's access logs after stats run that mean , if i understood the function , i will not be able to download
    the raw web log monthly anymore ?
     
  8. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    That's one of the complications with using that feature. Check out my "empty log files" script for WHM. I use it to manually empty various log files when they reach a few hundred meg in size. I'm thinking about adding an option to keep the last x number of lines in the log file, but it may be a while before I have time to.

    see my sig
     
  9. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page