Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my Debian Wheezy, every half-hour a cron job runs:

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)

This deletes oldish PHP state/session files. I would like to drop this cron job altogether, or at least decrease its frequency. In which of the following use-cases is that possible?

  1. A server which has no PHP code running
  2. A server with the odd page with PHP here and there, but nothing serious like a CMS
  3. A server running, say, some PHP CMS, with user sessions, but with not too many page views (say up to 50,000 a month)
share|improve this question

closed as not a real question by Ward, mdpc, Jenny D, Dave M, Magellan Apr 13 '13 at 23:56

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

5  
I think the right question to ask here is "What would I gain by throwing away every assumption the maintainers of this package made just so I can save a line of logging per half hour in syslog" –  gparent Mar 28 '13 at 18:02
2  
Perhaps it would help us to understand your Question if you explained the actual problem you are having. Server Fault requires that Questions be based on an actual or potential problem you are facing. There doesn't seem to be any meaningful downside to leaving the cron job as the port maintainers had intended. –  Chris S Mar 29 '13 at 13:44
3  
My $0.02. The PHP session handling built into the Debian package is horribly broken and annoying. I comment out the default jobs in /etc/cron.d/php5 and add specific jobs, or adjust the php.ini settings so that PHP handles garbage collection like what happens on most other systems by default. Or even better, switch your session handler out and make your sessions database or memory based. –  Zoredache Apr 13 '13 at 0:54
add comment