[Bug 876387] Re: fuser forking uncontrollably in cron job

Ondřej Surý ondrej at sury.org
Tue Nov 27 10:23:20 UTC 2012


Ben,

could you try replacing the standard cron-job with this script:

-- cut here --
#!/bin/sh

# first find all used files and touch them (hope it's not massive
amount of files)
lsof -w -l +d /var/lib/php5 | awk -e '{ if (NR > 1) { print  $9; } }'
| xargs -i touch -c {}

# find all files older then maxlifetime
find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f
-ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) -delete
-- cut here --

It takes other approach which should be lighter to the system, but I
need a confirmation from users before I apply it to Debian package (and
before it gets pulled to Ubuntu).

Ondřej

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/876387

Title:
  fuser forking uncontrollably in cron job

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/876387/+subscriptions



More information about the Ubuntu-server-bugs mailing list