site outage problem with apache2, php5

Avi Greenbury lists at avi.co
Wed Jun 12 11:35:11 UTC 2013


Kevin Sha wrote:
> Hi,
> 
> I am running apache2 php5 on ubuntu 120.04 LTS 
> i have faced site outage for 15 min periodically.
> i have noticed a /etc/cron.d/php5 corn running every 30 min. During this time
> nobody can access the the site

This cronjob deletes old session files and generally has no noticeable
effect on the system (assuming you've not modified it). Before we go
any further, it would be good to confirm that this is what it's doing
- the content of the file should look something like this:

    # /etc/cron.d/php5: crontab fragment for php5
    #  This purges session files older than X, where X is defined in seconds
    #  as the largest value of session.gc_maxlifetime from all your php.ini
    #  files, or 24 minutes if not defined.  See /usr/lib/php5/maxlifetime
    
    MAILTO = "" 
    # Look for and purge old sessions every 30 minutes
    09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete 1>&2 2>/dev/null

Does it?

-- 
Avi




More information about the ubuntu-server mailing list