Find the answer to your Linux question:
Results 1 to 8 of 8
Hey Guys, I've been pulling my hair out on trying to find out why my var partition steadily keeps filling up. Up to the point where it fills up 100% ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    4

    Apache filling up Var partition


    Hey Guys,

    I've been pulling my hair out on trying to find out why my var partition steadily keeps filling up. Up to the point where it fills up 100% and my postgresql and sendmail server's stop.

    I've just about found the culprit, ie. Apache. Once i restart the apache server the partition goes back to about 50%.

    Does anyone have an idea as to why this happens or how to sort this problem out.

    Thanks.

  2. #2
    Linux Guru Vergil83's Avatar
    Join Date
    Mar 2004
    Posts
    2,407
    could it be the apache logs?
    Brilliant Mediocrity - Making Failure Look Good

  3. #3
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    I was thinking logs also, but that doesn't make sense if the partition drops down to 50% when it is shutdown...the logs would stay there regardless of whether the daemon was running or not...

    I guess I would start taking an inventory of whats on that partition when apache is off versus on...maybe that will point you in the direction of where the size increase is coming from...just sounds weird...
    Join the Open Source Revolution. Support GNU/Linux.

    Find me at: www.deeksworld.com
    Registered GNU/Linux User #395777

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Oct 2005
    Location
    North Carolina, USA
    Posts
    45
    I'm wondering if there are any CGIs running on the server. Doesn't perl, for example, write temp files to /var/tmp during file uploads? Or maybe just some errant script writing to a file, not closing?

  6. #5
    Just Joined!
    Join Date
    Aug 2005
    Posts
    4
    could it be the apache logs?
    It doesnt seem to be the logs... They add to the size increase but once they are deleted then the partition shrinks a bit.... Then starts growing again...... The logs aren't then created until the next apache restart.

    Or maybe just some errant script writing to a file, not closing?
    I'm moving towards this..... maybe some unlinked file(s) that doesnt get freed up until the next reboot......
    But how to get around this....

  7. #6
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,934
    You need to find out what is being written and why you're running out of space. With a near full /var, cd to /var/html (or wherever your apache document root is stored) and do:
    Code:
    du -sh *
    to see which directories are the most full, and work your way down the directory tree to see what is going on.
    Linux user #126863 - see http://linuxcounter.net/

  8. #7
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1
    Hi,

    We are also experiencing the same issue and have found that its the deleted open log files (gets generated with logrotation) are actually occupying the disk space which can be seen with the following command:

    lsof | grep /var

    This will show you the files with deleted tag on the right. Actually, when the logs are rotated those logs are still accessed by the respective application and when logrotation tries to delete the logs after log rotation it actually doesn't gets deleted and occupy the space. When we restart apache2 the deleted open log files gets closed and the space is returned back.

    Let me know if you find any permanent fix for the same.

    Thx, Ramesh Daryani

  9. #8
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Hello and welcome, Ramesh!

    This thread is almost 5 years old so I'm going to lock it, but please feel free to start a new thread of your own if you are having any problems that you need help with.
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •