getting some database errors again

[Tue Jul 02 11:47:12 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_mydomain.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'wp_12_user_roles' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, switch_to_blog, WP_Roles->reinit, get_option
[Tue Jul 02 11:47:12 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_mydomain.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'siteurl' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
[Tue Jul 02 11:47:12 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_mydomain.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
[Tue Jul 02 11:47:12 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_mydomain.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'upload_url_path' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
[Tue Jul 02 11:47:12 2013] [error] [client 109.239.58.82] WordPress database error Table 'zadmin_mydomain.wp_12_options' doesn't exist for query SELECT option_value FROM wp_12_options WHERE option_name = 'uploads_use_yearmonth_folders' LIMIT 1 made by do_action_ref_array, call_user_func_array, WPMUDEVSnapshot->snapshot_backup_cron_proc, WPMUDEVSnapshot->snapshot_ajax_backup_init, WPMUDEVSnapshot->snapshot_gather_item_files, snapshot_utility_get_blog_upload_path, wp_upload_dir, get_option
[Tue Jul 02 11:48:16 2013] [error] [client 109.239.58.82] PHP Fatal error:  Uncaught exception 'cURL_Exception' with message 'cURL resource: Resource id #862; cURL error: couldn't connect to host (cURL error code 7). See http://curl.haxx.se/libcurl/c/libcurl-errors.html for an explanation of error codes.' in /var/zpanel/hostdata/zadmin/public_html/mydomain_com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/lib/requestcore/requestcore.class.php:843\nStack trace:\n#0 /var/zpanel/hostdata/zadmin/public_html/mydomain_com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/services/s3.class.php(923): RequestCore->send_request()\n#1 /var/zpanel/hostdata/zadmin/public_html/mydomain_com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/services/s3.class.php(1211): AmazonS3->authenticate('mydomain', Array)\n#2 /var/zpanel/hostdata/zadmin/public_html/mydomain_com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/services/s3.class.php(2205): AmazonS3->get_bucket_headers('mydomain')\n#3 /var/zpanel/hostdata/zadmin/public_html/mydomain_com in /var/zpanel/hostdata/zadmin/public_html/mydomain_com/wp-content/plugins/snapshot/lib/destinations/aws/AWSSDKforPHP/lib/requestcore/requestcore.class.php on line 843

hey, snapshot worked for a while, now i am getting some errors again.

the curl error was here the first time, so maybe we just ignore em for now and see if the file gets send later on.

http://gyazo.com/bd060e6466f84a1f99c9e87abc5850c6

as you can see i have 2 sites in the backup. the first one works, its a subsite like demo.mydomain.com. the second one is my mainsite ant it wont snapshot it. maybe thats because of the error.

1. A snapshot / backup tool is something i rely on. so if there are error it should point it out BIG in the network admin or send me an email or something!!!

2. I just cant imagine where this is comming from: zadmin_mydomain.wp_12_options' doesn't exist for query SELECT
ive searched the whole database with phpmy admin, cant find this entry, and in the snapshot settings there is no table named this way? so wye does snapshot try to back somethign up that dont exist?

all what i can imagine is that he gets the information that this table exists, trye to backup it and then gets an error because its not there... am i right?

ive disabled the option "stop on errors" now... that might work, but i would like to get this fixed anyway....

regards and thanks for the help!
Patrick

  • Alexander

    @phofmann,

    Thanks for all the additional information. Sorry to see you're having this issue. So with the curl error, do you get this every time? This actually concerns me because it means that the data is not being stored on Amazon S3. It's a connection error, meaning it can't actually establish a connection with S3.

    Can you please double check your S3 settings and make sure that your credentials are valid and that a bucket is selected?

    As for the database error, have you added or deleted any sites recently?

    Also, can you try creating a new snapshot and running it? Let me know if you get any errors. I'm not sure what's causing this, but I suspect if you have "Include selected database tables in this Snapshot" enabled, it might not realize that table no longer exists.

    Best regards

  • phofmann

    cURL:
    The error is new, was the first time it apeared... as you can see on the screenshot it worked before.

    For the Database Error:
    I have selected:
    Include all blog database tables in this archive. This will automatically include new tables.
    plus i dont get this error when i select run immediate.

    what i am still not sure with is how the cron works? as a networkamin it seems like i just dont trigger the cron or something... but thats another thing.

    as i mentioned: the interesting part is that when i select "run immediate" i dont get any errors. when i select "every 30 minutes" just NOTHING happens (even if i trigger wp-cron.php directly from my browser....

    i will recreate the snapshot...

    edit:

    testing the connection:

    Connecting to AWS
    Using SSL: Yes
    Setting Region: EU (Ireland) Region (s3-eu-west-1.amazonaws.com)
    Using Storage: Standard
    Using ACL: private
    Sending file to: Bucket: mybucket: Directory: backup/
    Send file success: Snapshot_7TiT4b

  • phofmann

    this is getting kind of ridiculous...
    - deleted both jobs
    - recreated both jobs
    - called wp-cron.php in my browser
    - get an error (time out) even with 300 seconds php script execution time
    - lokked at the jobs, they where sent... everything looks fine
    - no errors in log
    - just called the cron again
    - seems to work

    i will update this post if anything changes....
    but i cant recreate all jobs everytime a error happens O_o

    regards

  • Paul

    @phofmann,

    Thanks for the info. We've seen reports of the DB errors from other members. So far have not been able to reproduce in any development environments. The assumption is there are other plugins installed filtering the DB queries. Will try and look into this later this afternoon.

    As for the Crom this is pure WordPress. When you save the Snapshot item and it is scheduled (not immediate) snapshot basically registers a new cron event to run with WP_Cron via the API. The WP_Cron records this request and will call the Snapshot function when that time is reached. The WP_Cron is somewhat unreliable but the best current option outside of using a UNIX cron to call the /wp-cron.php in your site root.

    As for the Curl issue this is not controlled within Snapshot or WordPress. Check with your host provider.

  • phofmann

    using a UNIX cron to call the /wp-cron.php in your site root

    i will setting this up :slight_smile: just thought about it... unfortunatelly there is a problem with this to... i want to disable the cron in the wp-config to run it from the backend exclusivly... but when i do this i cant shedule backups... so its not expected by snapshot that a user does manual crons.
    i have my doubt that the registration of the cron jopbs works right... because when i call the wp-cron.php manually still nothing happened for several hours... but i will test this a little more.

    this backup tool is realy essential. still wondering from where it gets the information of the tables that arent there...

    Check with your host provider.

    well i am the hosting provider lol :smiley: but as i mentioned this error apeared only once and is gone now...

  • Paul

    you shouldn't need to disable WP_Cron in your wp-configi. Just setup a UNIX crontab to call the /wp-cron.php at whatever intervals.

    i have my doubt that the registration of the cron jopbs works right

    You are entitled to your doubts. Technically using the WP Cron API just adds an entry to the cron array which is then stored into the wp_options table. When /wp-cron.php is run is loads this array and checks is item past the current timestamp are needed to run. You can install one of many available cron view plugins that show what is in cron and when items are expected to run.

    get an error (time out) even with 300 seconds php script execution time

    Where exactly are you seeing these errors? When you are doing what exactly?

  • phofmann

    Update: i called the wp-cron.php again manually.
    Connection closed
    was what i got after round about 10 seconds

    as you can see on the screenshot 1 snapshat where completed, the other one not...
    the errorlog again says nothing.

    ive installed the debug toolbar and the cron plugin, then i enabled the debug mode in wordpress config. everything seems to running quit smoothly right now :slight_smile:

    i will mark this as resolved after a few more tests...

  • phofmann

    i think it has something to do with the deleted blogs... dont know where this come from, i searched the whole database for an entry like this but couldnt find one... really strange....

    for the issue that it isnt running -> i had a maintaince mode plugin active... the bad thing is that this plugin deactevated the cron task for some reason... so the cron wont run.... thats strange 2... but at least i might have found the last issue here... thanks so far, i will reply if i find something similar again....

  • Paul

    @phofmann

    Cool good work! Could you tell me a little more about this issue? i am just a little curious...

    The issue is related to some old fuzzy logic within the plugin that is related to WP 3.5+ Prior to WP 3.5 the main site and sub-site media uploads directories were known to be /wp-content/uploads for main and /wp-content/blogs.dir/X/ for sub-site where X is the number of the site. In WP 3.5 on a fresh install the sub-site uploads directory is now /wp-content/uploads/sites/X/ So Snapshot tries to determine the configurations. The issue is that snapshot wants to exclude the new path since sub-sites media files should not be included in the main site backups.

    if i have time i will try to enable open base dir again.... still not knowing wye this wont work... maybe i need your help again :slight_smile: till then happy coding!

    I'm familiar with openbase but not sure how it is effecting Snapshot. My understanding is that when openbase is enabled you can't access files outside of the root directory. Maybe this is related to one of the destination libraries. I know for example both AWS and Dropbox libraries need some functions from the Zend libraries which are generally loaded outside of the site root. But most hosts know these will be access by various PHP applications and setup exceptions in the openbase configuration. So maybe that is your solution.

  • phofmann

    thanks for the insight! does that mean when he finds a path he tryes to find an optuion table for this particular blog?

    i have another issue here:

    Ive changed the intervall of the backups from 5 minutes (for testing) to twice a day...
    this was 2 days ago:
    http://gyazo.com/b8e2086fecb3ca0ed51e3deeb33e8240

    but regardles of this the backups continue to run every 5 minutes...
    http://gyazo.com/0701e44b332d7464f3dc96afc3d93742

    maybe that should be fixed in the next release to?

  • Paul

    @phofmann,

    look at the screenshots!

    Watch the '!'. Makes me think you are screaming at me. From your perspective things might be obvious. But you gave me two screenshots. The first I'm assuming is the row information from the Snapshot > All Snapshots listing. Yes, I concur it does show twice daily.

    For the second screenshot I don't even have a clue what that is. Is that from the Snapshot log or your server logs? Again to me this is just a list of times showing me something is running every 305 minutes but I don't have context.

    From your previous posts on this thread you mentioned running Snapshot outside of WP_CRON. So assuming you have your UNIX crontab setup correctly I'm not sure what to suggest. Give me some details so I can help piece together the full spectrum of your system.

    If the snapshot IS running every 5 minutes Is the snapshot item accumulating archive? Meaning you say it runs every 5 minutes. Does it produce a new archive each time?

    Try installing a WP_CRON view plugin like CronView ( http://wordpress.org/plugins/cron-view/ ) It will show what items are in WP_CRON. You should be able to see that Snapshot is correctly setup.

    Hope to hear from your soon.

  • phofmann

    sorry, it dont meant to insult you :slight_smile: i was in a hurry so didnt explain further. i see that out of context this is really hard to understand, sorry, my bad.

    so the cron is running with wp. the first screenshot is from within the plugin. the second one is the amazon s3 bucket with the backed up files. as you can see he is sending a file every 5 minutes...

    regardles if it should be twice dayli... and there still was a cron that sais 5 min...(not file send) but now its just gone and everything is working fine now... i feel kind of stupid right now :slight_smile:

    regards from berlin
    patrick

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.