[php-maint] Bug#741254: php5-common: use of fuser in cron.d/php5 eats up a lot of cpu time, need backporting

Paolo Benvenuto paolobenve at gmail.com
Mon Mar 10 13:01:54 UTC 2014

Package: php5-common
Version: 5.4.4-14+deb7u8
Severity: normal

/etc/cron.d/php5 in 5.4.4 uses fuser in order to delete old session files in /var/lib/php5. According to user reports, using fuser isn't the best solution. In particulare it leads to fuser eating up a significant amount of cpu time if web server used intensively.

On my server I backported the solution of 5.5.9+dfsg-1, importing /usr/lib/php5/sessionclean and /usr/libe/php5/maxlifetime from 5.5.9, and changed /etc/cron.d/php5 as in 5.5.9, see my configuration file reported above.

As a result, now cpu usage is far less intensive: system cpu time use has reduced by one order of magnitude!

I think the solution used in 5.5.9 can be backported producing a new version of 5.4.4

-- System Information:
Debian Release: 7.4
  APT prefers stable
  APT policy: (650, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/12 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages php5-common depends on:
ii  dpkg    1.16.12
ii  libc6   2.17-7
ii  psmisc  22.19-1+deb7u1
ii  sed     4.2.1-10
ii  ucf     3.0025+nmu3

php5-common recommends no packages.

php5-common suggests no packages.

-- Configuration Files:
/etc/cron.d/php5 changed:

09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)

-- no debconf information

More information about the pkg-php-maint mailing list