Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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.


  2. #2
    could it be the apache logs?
    Brilliant Mediocrity - Making Failure Look Good

  3. #3
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Fort Wayne, IN
    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:
    Registered GNU/Linux User #395777

  4. $spacer_open
  5. #4
    Just Joined!
    Join Date
    Oct 2005
    North Carolina, USA
    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
    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
    Nottingham, England
    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:
    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

  8. #7

    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
    Join Date
    May 2004
    arch linux
    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.

Posting Permissions

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