Reputation: 68
Ubuntu server 10.04, Apache 2.2.14, PHP 5.3.2, MySQL. For the drive where session files are stored:
df -h:
Filesystem Size Used Avail Use% Mounted on
/dev/md1 450G 86G 341G 21% /
df -ih:
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md1 116M 9.4M 107M 9% /
Any ideas?
Upvotes: 1
Views: 7208
Reputation: 68
Finally remembered to answer with the solution! Turns out there were too many files in one directory. Had to start hashing the session files into subdirectories.
Upvotes: 2
Reputation: 766
Apache reports this error when it can't register a lock on a file(which it assumes is because the fs is full). Next time it occurs try running
ipcs -s
and look for an abundance of registered locks owned by the apache process. You can then either remove them with ipcrm, or raise their limit with the kernel variable (kernel.sem) as mentioned In this blog post.
Upvotes: 1
Reputation: 257
just check in the php.ini file where the sessions file are stored, and then check the free space, if is 100% used, change the fstab configuration (in case of a (re)mounted directory) and restart the server, or change the path and restart the apache server.
In my case:
evo ~ # locate php.ini
/etc/php/apache2-php5/php.ini
/etc/php/cli-php5/php.ini
evo ~ # grep -v ";" /etc/php/apache2-php5/php.ini | grep session | grep path
session.save_path = "/tmp"
session.cookie_path = /
evo ~ # grep -v ";" /etc/php/cli-php5/php.ini | grep session | grep path
session.save_path = "/tmp"
session.cookie_path = /
evo ~ # df -ha /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/root 230G 27G 203G 12% /
evo ~ # df -ha /
Filesystem Size Used Avail Use% Mounted on
/dev/root 230G 27G 203G 12% /
Upvotes: 0