Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

migrated from Jul 18 '12 at 8:18

This question came from our site for computer enthusiasts and power users.

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 9 '13 at 2:13
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.