Snapshot not running on 1 site. Next file send in past.

I've installed Snapshot on multiple blogs, but can't get it to work on this one

http://www.sarahfalugo.com

SnapShot is latest version

DropBox is authenticated.
Site gets traffic

Curiously on Snapshot page Next File Send is well in the past (18th February) which is probably when I first attempted to run the job.

Please advise

Chris

  • Patrick
    • Support Monkey

    Hi @Revealwebdesign

    Welcome to the forums!

    We'd need a bit more information to help you debug this issue:

    Is WP_CRON perhaps disabled in your wp-config.php?

    Are you getting any error messages displaying?

    Have you set error reporting to stop on warnings and/or notices?

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Curiously on Snapshot page Next File Send is well in the past (18th February) which is probably when I first attempted to run the job.

    Try editing that snapshot item and re-saving it. Since the date is old I'm assuming WP_CRON is not being run. The WP_CRON is part of WordPress and not directly controlled by Snapshot. You can try manually loading the page by going to http://www.mysite.com/wp-cron.php (where http://www.mysite.com is your actual domain).

    Other than that look at the logs. On the All Snapshots listing in the last column, Archive you should see a link for a log file. It is is not there then this means a complete run has not finished. You will need to look for the file manually. It should live in wp-content/uploads/snapshots/_logs/ The newest file should be the one you want. Open it. Read it. Look at the bottom to see if any errors are reported.

    Go to Snapshots > Settings. There is a panel, 'System Info' showing all information needed to help debug this further. Please report back what is on that panel.

  • wiredstudios
    • The Incredible Code Injector

    Try editing that snapshot item and re-saving it. Since the date is old I'm assuming WP_CRON is not being run. The WP_CRON is part of WordPress and not directly controlled by Snapshot. You can try manually loading the page by going to http://www.mysite.com/wp-cron.php (where http://www.mysite.com is your actual domain).

    wp-cron,php is a blank page. Should I see anything?

    Other than that look at the logs. On the All Snapshots listing in the last column, Archive you should see a link for a log file. It is is not there then this means a complete run has not finished. You will need to look for the file manually. It should live in wp-content/uploads/snapshots/_logs/ The newest file should be the one you want. Open it. Read it. Look at the bottom to see if any errors are reported.

    In /_logs/ there is only an index.php and .htaccess index.php is empty

    Go to Snapshots > Settings. There is a panel, 'System Info' showing all information needed to help debug this further. Please report back what is on that panel.

    The following table shows version information about your server. When contacting support it might be helpful to provide this information along with your specific issues.

    WordPress Version 3.5.1
    PHP Version 5.3.10
    MySQL Version 5.5.30
    Is Multisite No
    WP_CRON Snapshot uses WP_CRON to run automated backups. If you have disabled WP_CRON via your wp-config.php you will not be able to schedule snapshots.
    WP_CRON Enabled.
    _SESSION Snapshot uses _SESSIONS to store temporary information about database tables and files during the backup and restore processing. Sessions are a default part of PHP.
    Session save path: /tmp
    Session save path is a valid directory.
    Session save path is writeable.
    Folder Permissions Writable (0755) – /wp-content/uploads/snapshots
    Writable (0755) – /wp-content/uploads/snapshots/_backup
    Writable (0755) – /wp-content/uploads/snapshots/_locks
    Writable (0755) – /wp-content/uploads/snapshots/_logs
    Writable (0755) – /wp-content/uploads/snapshots/_restore
    PHP runtime information
    Display Errors Off
    Error Reporting 4983 - E_ERROR, E_WARNING
    Magic Quotes Off
    Max Execution Time (seconds) 30 The value displayed can be adjusted by Snapshot PHP scripts.
    Memory Limit 40M - WP_MEMORY_LIMIT defined by WordPress wp-config.php.
    Open Basedir Off
    Safe Mode Off
    ZLib Compression Off

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    No, you should not see anything on the wp-cron.php file.

    Some more to try.

    Have you tried running a manual Snapshot? Basically create a new snapshot configuration and select 'Immediate' from the Interval options. Select Files and/or database table. Click the blue submit button at the bottom. This manual method will usually bring out any processing errors like memory limit etc.

  • Paul
    • The Green Incsub

    Also just noticed your memory shows at 40M. So you might want to bump this up to 128M http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    There is a difference in the wp-config memory limit and the Memory Limit as defined for Snapshots > Settings. The wp-config.php definition is for your entire site. The Snapshot > Settings memory is just for the Backup/Restore processing. Try increasing your wp-config first.

    Though I still think this is WP_CRON related. If you were having memory issues you would at least see some logs showing an attempt to create a backup.

  • wiredstudios
    • The Incredible Code Injector

    Hi Paul,

    I've upgraded the Memory just in the Snapshot settings so far, and running an immediate backup completed without errrors, and I can see the log in Snapshots etc.

    My automatic job (set for every five minutes ) hasn't run, and Next: is in past (last time i clicked 'Run Now')

    I've also now scheduled the new job that I created to run immediately and this is not running.

    Also Transfer to DropxBox is not happening.

    I've Now Increase memory in wp-config.php too.

    I think you're saying that you think that the CRON isn't running? Is that right? I do get notifications of upgrades though which is CRON related right?

    Thanks for your help so far

    Chris

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Chris, Ok. o at least we know that your system can create an archive. Or at least that is now clear to me. so you mentioned you have other sites running Snapshot. And these are running scheduled backups??

    Normally when you click on the 'run now' link in Snapshot it attempts to run an immediate scheduled WP_CRON instance. You have tried this without success?

    The only other thing is to install a WP_CRON plugin? http://wordpress.org/extend/plugins/search.php?q=WP_CRON which will let you see the scheduled tasks. Each task will show the callback function. For Snapshot this callback function is something like 'snapshot_...'

  • wiredstudios
    • The Incredible Code Injector

    Chris, Ok. o at least we know that your system can create an archive. Or at least that is now clear to me. so you mentioned you have other sites running Snapshot. And these are running scheduled backups??

    Yes one on same hosting is working too.

    Normally when you click on the 'run now' link in Snapshot it attempts to run an immediate scheduled WP_CRON instance. You have tried this without success?

    Yes. I get 'Item scheduled to run' But it never happens. In fact as I've attempted this again the new job does not show up in Cron

    The only other thing is to install a WP_CRON plugin? http://wordpress.org/extend/plugins/search.php?q=WP_CRON which will let you see the scheduled tasks. Each task will show the callback function. For Snapshot this callback function is something like 'snapshot_...'

    Installed I see the snapshot hooks. Next Due is always in past.

  • Paul
    • The Green Incsub

    @Revealwebdesign

    Installed I see the snapshot hooks. Next Due is always in past.

    Yeah, I keep seeing you mention the next interval is in the past. This indicates to me there is something no right on this system. In the upper right just above the All Snapshots listing you should see two sets of timestamps. The first is your current system time. The second is the next time the file delivery process will run. This 'file delivery' process is what sends the manually created snapshot archives to the remote destinations. It should be running every 5 minutes.

    The file delivery WP_CRON as well as the scheduled backups all work the same way. Each call the WP_CRON API to schedule a task to run at a certain interval. The WP_CRON process keeps track of the time calculations and when the time hits it will call one of the snapshot functions to start the processing.

    Is there anything in the server logs maybe? I'm running out of ideas. If you don't have CRON disabled ( http://codex.wordpress.org/Editing_wp-config.php#Alternative_Cron ) then it should be running. As you mentioned you are getting update notifications.

  • wiredstudios
    • The Incredible Code Injector

    The first is your current system time. The second is the next time the file delivery process will run. This 'file delivery' process is what sends the manually created snapshot archives to the remote destinations. It should be running every 5 minutes.

    Current time: March 3, 2013 12:37 pm
    Next File Send: February 18, 2013 1:02 pm

    Also the 'Run Immediately' job is still waiting to send.

    I'm looking at my server logs now, but they're empty. So I'll see what info I can get from my webhost.

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    So when you click the 'run now' it does create the archive? This is different than the manual method I mentioned in a previous message. When you click the 'run now' it does use WP_CRON to run an immediate backup and send to a destination if configured.

    So in the Archives column you see the link for the log on the second line? If you view the bottom of the log do you see anything related to sending to Dropbox?

  • wiredstudios
    • The Incredible Code Injector

    So when you click the 'run now' it does create the archive? This is different than the manual method I mentioned in a previous message. When you click the 'run now' it does use WP_CRON to run an immediate backup and send to a destination if configured.

    NO.

    The archive that you can see in the screenshot was created as a new 'Run Immediately' job. Which worked. I subsequently edited it to see if would schedule or 'run now'

    From My WebHost. Re: Lack of logs

    Sorry about that - this appears to be down to a permissions issue on the user account. I have pushed through an update for this, but it will take roughly 45-60minutes to complete fully.

    After this time the log files should be viewable.

    I asked if this could solve the Cron problem and got this response.

    Possibly - we don't actually support cron, we request that you use the Scheduled Tasks feature in the cpanel. But if it's working on another domain with us you should be able to get it working on this domain too.

    it IS working on another domain with them.

    Is this the end of the line? i know it's not in your remit to debug host issues...

    FWIW I'm still getting no logs on the cPanel....

    Chris

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    If you are willing to stuck with this thread then so am I. If anything we can figure out the issue and hopefully patch the code and prevent other members from having similar issues.

    So one question. I noticed your host used the phase ''Scheduled Tasks'. Are you running Windows?

    Form my previous reply I asked about the log files from Snapshot. Any chance seeing those?

    Any chance getting access to the site to see this first hand?

  • wiredstudios
    • The Incredible Code Injector

    If you are willing to stuck with this thread then so am I. If anything we can figure out the issue and hopefully patch the code and prevent other members from having similar issues.

    So one question. I noticed your host used the phase ''Scheduled Tasks'. Are you running Windows?

    No! It's part if the linux cPanel the hosts have, I think it's looking for perl or in anyways .pl files.

    Form my previous reply I asked about the log files from Snapshot. Any chance seeing those?

    Any chance getting access to the site to see this first hand?

    yes, of course. Are you :stuck_out_tongue:aul@incsub.com">Paul@incsub.com ?

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Thanks. Info received and looking at the issue. The only thing I can think of it might be something with the timezone. I need to test on my own site to see if there is some issue with the time calculations for the UTC+0 logic. Will work on this this evening.

    Thanks again for your patience.

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Well not able to reproduce the issue on my local site. I did deactivate Snapshot on your site then reactivate. This at least corrects the cron timer showing in the upper right of the All Snapshots page. But the cron process still does not ever start. Still digging. Trying things on my local.

    I guess next request is to see if I can somehow get FTP access to the plugins/snapshot folder. That way I can add some debug to the plugin code and try something instead of spending time trying to recreate the issue on my local system.

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    More information of what I'm seeing on your site. When I view the Tools > Cron output I show many items that are old. Things like the plugins and themes update CRON setup by WordPress. These are setup to check updates multiple times a day but have not run since March 1st.

    So something is not quite right in your setup. Just not sure what the issue is yet. But will find it.

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Well some progress. See image. I basically followed the code process of the ./wp-cron.php and figured out there was a cron lock. This lock was from March 1st and prevented new cron cycles from running.

    So programmatically removed the lock and appears Snapshot as well as the other cron processes caught up. Going to keep an eye on things to see if Snapshot retains its interval cycle. Since you have multiple snapshot configurations all set for 5 minute intervals I'm going to turn all off but one for Dropbox.

    All this without changes to the Snapshot plugin code.

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Well things are not solved yet. So please don't mark this as resolved. But I don't think the issue is related to Snapshot. There is something in this system preventing the WP_CRON from properly processing.

    The way WP_CRON works is when any front-end page is loaded it will do a callback to the http://www.sarahfalugo.com/wp-cron.php file. As part of this file's processing is checks the LOCK I mentioned in my previous post and if not locked goes on to check if scheduled items need to run. These schedule items are those you see on the tools > cron listing. The scheduled items have a specific timestamp to be executed. The wp-cron.php file checks the current system (GMT) time and any of the scheduled items older than current time will then get executed.

    But on this system the wp-cron.php does not seem to be getting called. I'm not sure why. So do you have access to the server logs via your control panel? Would be interested to see if there are any calls to the wp-cron.php file.

    If I look at the logs for my local site the entries appear something like the following

    127.0.0.1 - - [30/Dec/2012:19:05:43 -0500] "POST /wp-cron.php?doing_wp_cron=1356912343.8661770820617675781250 HTTP/1.0" 200 - "-" "WordPress/3.5; http://local.inc35.com"
    127.0.0.1 - - [30/Dec/2012:20:15:57 -0500] "POST /wp-cron.php?doing_wp_cron=1356916556.7324500083923339843750 HTTP/1.0" 200 - "-" "WordPress/3.5; http://local.inc35.com"
    127.0.0.1 - - [30/Dec/2012:20:15:57 -0500] "POST /wp-cron.php?doing_wp_cron=1356916556.8220069408416748046875 HTTP/1.0" 200 - "-" "WordPress/3.5; http://local.inc35.com"

  • Paul
    • The Green Incsub

    @Revealwebdesign,

    Apologies. I've been on a non stop rollercoaster of support these last few days. Just getting back to your issue.

    As far as I can tell the issue is the wp-cron.php file is not being called which is outside of the control of the Snapshot plugin. This is directly related to the Cron listing on Tools > http://www.sarahfalugo.com/wp-admin/tools.php?page=cron_gui which shows everything outdated even the standard update crons.

    I'm trying to do some googling today to see if there are reports in the WordPress community where this is happening to others and maybe a solution.

  • Patrick
    • Support Monkey

    Hi @Revealwebdesign

    I'm doing a bit of housekeeping by going through some older threads, and I noticed this one is still open.

    Just to get it out of our active ticket system, I'm going to mark it resolved.

    But if you still need assistance on this issue, please don't hesitate to re-open it by checking the "Mark as not resolved" box below.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.