#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Location
    Cairo, Egypt
    Posts
    238
    Rep Power
    29

    /var/ is filling TOO FAST to full (%100)


    hi,

    i have a freebsd 5.4-stable server, my /var volume keeps raising to %100 and the server crashes, i use a big MySQL database, besides i use a technique that a php file reads the mysql data and stores it in a text file every 10 minutes, then i display the text file contents on the main page instead of connecting to database and hammering the server ...

    I've noticed that when it rises to 100%, /var/tmp is using the whole size, it's normal is 14MB, but it rises to 114MB !!!

    I think it's something related to the php file which reads the contents and store it in a text file, cuz before i make this technique i didn't have this problem, but it's just that i HAVE to use it to reduce the mysql usage.

    the /var volume's normal capacity is 50%, when i do a (df -h) i see that it rises 55% ... 58% ... 60% ... %65 ... then drops again to 50% (((( EVERY 10 MINUTES ))))

    i was lucky to see which files that thier sizes increase in the /var/tmp and i found them to be related to mysql, the names of the files are ( #sql_243_0.MYD && #sql_243_0.MYI ) ... I think these are the opened MySQL tables atm, so is there any configuration I can make to MySQL database to make it create these files anywhere other than /var ?? like /usr (which i have plenty of space on it)


    any help will be much appretiated, Thanks in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2006
    Location
    HippyLand
    Posts
    109
    Rep Power
    10
    Originally Posted by Emadello
    hi,
    I've noticed that when it rises to 100%, /var/tmp is using the whole size, it's normal is 14MB, but it rises to 114MB !!!
    Ah freebsd user, var need a generous portion and tmp needs to be (at least on my partition) at least 256 MB. The default partitioning is not generous. You may have to backup and re-allocate proper-sized partitons.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    42
    Rep Power
    11
    You might be able to backup /var and then add another drive to the system mounted as /var1. Restore /var to /var1 and then have it mount the new drive as /var. I have never done this but it seems like something that would work. Check the logs though. I'm sure that the logs are what is filling up /var.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2006
    Posts
    4
    Rep Power
    0
    Originally Posted by smoked1
    You might be able to backup /var and then add another drive to the system mounted as /var1. Restore /var to /var1 and then have it mount the new drive as /var. I have never done this but it seems like something that would work. Check the logs though. I'm sure that the logs are what is filling up /var.
    yah, you could use the dump and restore commands to do it. But definately clean out your logs, try to make var bigger, and maybe make a shell script that cleans out the temp folder every few minutes and cron it.

IMN logo majestic logo threadwatch logo seochat tools logo