Hi
On my Ubuntu Server 11.10 box, several thousand fuser processes are being created every half an hour. (This didn't happen in 11.04.) I traced the problem back to the cron job '/etc/cron.d/php5', which contains the entry:
Code:
[ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete
I think this removes old PHP sessions.
This is an extract from 'ps aux':
Code:
root 1636 0.0 0.0 0 0 ? Z 23:51 0:00 [fuser] <defunct>
root 1637 0.0 0.0 0 0 ? Z 23:51 0:00 [fuser] <defunct>
root 1638 0.0 0.0 0 0 ? Z 23:51 0:00 [fuser] <defunct>
root 1639 0.0 0.0 0 0 ? Z 23:51 0:00 [fuser] <defunct>
(many, many more...)
...
real 0m10.832s
user 0m2.796s
sys 0m4.952s
There are thousands of these, but they do disappear eventually. Once the cron job exits, all the defunct processes are cleaned up, presumably by init.
This also puts my system load up to about 2 every half an hour.
I could remove the cron job, but I'd imagine PHP sessions wouldn't be cleared up then. I couldn't find any bugs to do with fuser, but it could be perhaps to do with 'find' calling fuser.
Attached is a graph showing load average of this server.
Any ideas on what to do?
Thanks,
Will