fuser process php5 cron job using high amounts of cpu

Viewed 2213

We are seeing our server's CPU spike at 30 minute intervals. this is likely caused by php5 job to cleanup session files. this is taken from our /etc/cron.d/php5 on the server:

# /etc/cron.d/php5: crontab fragment for php5
#  This purges session files older than X, where X is defined in seconds
#  as the largest value of session.gc_maxlifetime from all your php.ini
#  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime

# Look for and purge old sessions every 30 minutes
09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

there seems to have been a problem with this job in past releases. there was a problem in version 11.10 of Ubuntu with this taking high amounts of CPU but we are running much later builds of both Ubuntu and PHP. how important is this job for PHP? can we stop this job from running or lower its priority?

2 Answers
Related