Answer the question
In order to leave comments, you need to log in
How to solve tmp overflow problem in Ubuntu?
The site is hosted on the Ubuntu server. Once every two weeks it crashes steadily with the error
SQLSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_3f0_0.MYD' (Errcode: 28)
I understand that the tmp folder is clogged. And restarting the VPS does not help. Only rm -r tmp Can you tell me how to regulate this behavior to prevent the site from crashing?
The directory contains sess_ files with the content __flash|a:0:{}
Answer the question
In order to leave comments, you need to log in
You need to monitor what is clogging /tmp, then find a safe way to clean it up and implement it as a cron task.
If the disks are partitioned correctly, there should be no problems. If /tmp is not mounted on a separate partition, then the problem may be with the overflow of the root (/) partition in principle. I myself encountered this out of inexperience.
As an option, you can change the tmp mount point to a larger disk:
stop Apache and muscle,
make a backup of the tmp folder
, create a 2 Gb partition, for example (we write our own paths)
create a filesystem with the mke2fs command
unmount the previous tmp
mount tmp on a new partition
we set the rights
to check that everything is fine we
restore the contents of tmp we
start apache and muscle
so that tmp is mounted correctly when the server is rebooted, in /etc/fstab we replace the entry about mounting tmp
Something like this.
spied here
And you can also throw sessions into the same memcached.
Or try something like tmpwatch
In short, look what's going on
. Your problem is that you specified the /tmp folder in php.ini and set it to 777 and you think that everything is a bunch. In fact, you do not have enough rights to delete these files!
Such crap has already been
Return the default setting, check whether it worked?
All sessions at you stupidly are not deleted.
no need to think even to twist with the folder, you need to cut php.ini and work with the rights to delete
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question