Unable to create lock file: No space left on device

pppplus

Verified User
Joined
Dec 19, 2008
Messages
526
Big new problem ! Maybe with new umount ?

Code:
# df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 34G  7.8G   25G  25% /
/dev/root              34G  7.8G   25G  25% /
none                   16G  452K   16G   1% /dev
/dev/md3              1.8T  505G  1.2T  30% /home
tmpfs                  16G  4.0K   16G   1% /dev/shm
/dev/loop0           1008M  309M  649M  33% /tmp
Code:
# php -v
Unable to create lock file:  No space left on device
Failed to start up concurrent users module!
PHP 5.3.22 (cli) (built: Mar  6 2013 03:25:30)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

phpMyAdmin - Error
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly.

phpmyadmin do not work
websites do not work properly

Note : I've upgraded apache to 2.2.24 and php to 5.3.22


=> NEW EDIT :
I delete a lot of files from /tmp, and it works again, but /tmp was not full, as df indicates.
I had 65362 files in it.
 
Last edited:
Yes, you're right !

/dev/loop0 65536 51588 13948 79% /tmp

So 79% used now, it was probably full.

=> how to avoid this ?
Why sess_ files are not automatically deleted when no more space available ?

=> and it is full in some minuts
 
You might need to install tmpwatch and configure it to delete oldfiles from /tmp directoriy.

Note, by default tmpwatch uses atime, not mtime to find old files. And if session files are read very often, then they would not be deleted. In this case you might want to configure tmpwatch to use mtime, or mount /tmp with noatime.
 
Thanks Zeiter

tmpwatch is already running. It is in cron.daily

=> but, even if I put in cron.hourly, it is not ok, because /tmp is full in about 10-15mn

So something is wrong
 
Then I'd guess one of the sites on your server is under bots attacks. You might need to find out which one exactly and apply some actions.
 
No, I don't think a website is under attack.

All sess_ files comes from 1 website, because it's a big website, with big traffic.
But, before this problem, there was the same traffic.

I detect nothing bad. Before, I have not this problem of sess_ files
I suppose updating apache and php changes something, and now, the sess_ files increase too much
 
thanks zEitEr, I will try to modify /tmp partition

I have actually a crontab to empty /tmp, that's a patch, waiting a better solution.

Thanks again for your help.
Please answer to my PM, so if I have always problem after modifyiing /tmp site, I will call your help

Best regards, you are very very helpfull !
 
Ok, I "solve" the problem with the indication of zEitEr

/tmp is now 6Go instead 1Go

I have a crontab running each 15mn to delete sess_ files older than 20mn
Code:
#!/bin/sh
find /tmp -mmin +20 -name 'sess_*'  | xargs rm

I think, that is not very good, but no better idea.

If someone find why I have sudonly this problem...
I've just upadated apache to 2.2.24 (instead of 2.2.23) and php to 5.3.22 (instead of 5.3.21)
 
It's my own script.
But it works in more than 200 websites without problem.
I have a lot of them in several servers, without problem.
 
Did you check the session files content? Might it be so that your script fails to find opened session and creates a new one on every request?
 
Back
Top