1

My Ubuntu 12.04 server comes with this cron job, which must be for cleaning up PHP session files

find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +24 ! -execdir fuser -s {} ; -delete

In my folder there are currently ca 1110000 such files and the server performance deteriorates because the clean up process never finishes. The server is virtual on a Xen platform.

Is there a more performant method available?

jdog
  • 111
  • 4
  • 28
  • If you `ps auxwwf`, do you see a `lsof` subprocess, with state D or DN, below the stuck `find` process? I had this on my Ubuntu server too, recently. The only way I could find to fix those was to restart the server. – Guillaume Boudreau Jan 09 '13 at 02:13

1 Answers1

0

I have fixed this problem by assuming that performance of my server is simply not fast enough. The second approach was to identify any scripts that generate unnecessary sessions and there was one key culprit.

jdog
  • 111
  • 4
  • 28