January 31st, 2006, 03:46 AM
/var/ is filling TOO FAST to full (%100)
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
January 31st, 2006, 05:39 AM
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.
Originally Posted by Emadello
March 16th, 2006, 12:21 PM
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.
April 15th, 2006, 09:33 AM
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.
Originally Posted by smoked1