Snapshot backup failing around 71% - no error message

I can't seem to get the Snapshot backups to work. I've used them on other sites and never had issues.

Initially I was getting a max_execution_time error so I added a php.ini file and that took care of the error message that was showing on the snapshot page but when I try to create a snapshot it goes to ~71% then stalls and eventually displays a blank page that says "2017" at the top.

  • Oguz

    Hey Julie ,

    Hope you're well.

    Can you add these codes to your wp-config.php file;

    /* Snapshot Settings */
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 10);
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600); // skip files over 100mb
    define('SNAPSHOT_FILESET_USE_PRECACHE', true);
    define('SNAPSHOT_FORCE_ZIP_LIBRARY', ‘pclzip'); // try pclzip or ziparchive
    /* End of Snapshot Settings */

    After that please try again to backup. If you are still having troubles I need your credentials to debug it, please DO NOT post the credentials in this thread as support forum is public and this info can be viewed by anyone, you can send us your details here https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

    Subject: "Attn: Oguz"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)
    -link back to this thread for reference
    -any other relevant urls

    Cheers!
    Oguz

  • Lindeni Mahlalela

    Hello Julie,

    I hope you are doing great today. I am really sorry about the inconveniences you are having with regards to using our Snapshot plugin and I hope we resolve it soon. Thank you for sharing your access, we were able to login to your site and do some troubleshooting.

    We have tried so many configuration options and it seems all configurations are correct but still we are having the issue. I have ran some various tests and I have found the following error in web console:

    POST http://mygrassrootsrealty.com/wp-admin/admin-ajax.php 404 (Not Found)

    It is immediately after this error when the issue occurs.

    This error simply means the admin ajax file was not found. I have checked the network activity in my browser and noticed that out of about 25 requests to the admin-ajax.php file, only one request has returned the 404 (Not Found) error all others were successful. The only explanation to this is that the host has set some rules to limit the number of requests, this can be done as a security measure.

    You need to contact your host to find out if they are blocking/limiting requests to any files or especially the file 'yourdomain.com/wp-admin/admin-ajax.php', if they are then you should ask they whitelist this file for your domain as it is required to process Snapshots along with a lot other requests from other plugins and even WordPress core and your theme.

    Here is a template message you can send to your host:

    Hello,

    I have a website running WordPress and it uses a backup plugin that makes requests to the file: 'http://mydomain.com/wp-admin/admin-ajax.php', the file exists but at some point a request to this file returns a 404 (Not Found) error. Here are the headers of the failed request:

    Request URL:http://mydomain.com/wp-admin/admin-ajax.php
    Request Method:stuck_out_tongue:OST
    Status Code:404 Not Found
    Referrer Policy:no-referrer-when-downgrade

    Response Headers----
    Cache-Control:no-cache, must-revalidate, max-age=0
    Content-Encoding:gzip
    Content-Length:7931
    Content-Type:text/html; charset=UTF-8
    Date:Thu, 31 Aug 2017 21:04:56 GMT
    Expires:Wed, 11 Jan 1984 05:00:00 GMT

    Form Data:----
    action:snapshot_backup_ajax
    snapshot-proc-action:file
    snapshot-action:update

    I was wondering if you have firewall rules that limit the number of requests to this file. If yes, would you please raise the limit or allow the file to be requested without limit for my website.

    Thanks.

    Would you please contact your host and find out if they have such rules that limit access to files. Please let us know what they say so we can proceed with this.

    I hope this helps.

    Have a nice day.
    Mahlamusa

  • Julie

    Okay, so I reached out to the host, initially they said there were no limits, then after they replicated the issue they said they raised the PHP limit and successfully created a backup. I can see the backup in the account but I'm still getting the same timeout issue whenever I try to create a backup.

    I also had them look into updating the theme since it was having a similar timing out issue. They also managed to update that, supposedly without error.

    Can y'all try creating a Snapshot and see if the error is the same as you were seeing before or if something else is going on now?

    Thanks,
    Julie

    Here are the important parts from my dialogue with the Hosting company for reference.
    --------------------------------------
    Namecheap: We have followed the steps to reproduce the issue, provided by you. Indeed, the backups were not generated properly.

    After we have increased the PHP llimits for your account, the following backup has been generated:

    /home/mygrgmeh/public_html/wp-content/uploads/snapshot/_backup/1504237477/snapshot-backup.zip
    --------------------------------------
    I was still unable to create a Snapshot myself so I asked them to continue looking into it. This was their response:

    During backup generation tests we have noticed that resource usage goes very high, namely Physical Memory Usage an I/O resources.

    I/O is in particular responsible for all the downloading/uploading processes. When I/O usage is high, all the processes are slowed down.

    At this point, backup generation script is still trying to proceed, however, all the processed are cut off in 1 minute because of Apache time out limit.

    It can be approved by the Apache error log:
    Script timed out before returning headers: admin-ajax.php, referer: http://mygrassrootsrealty.com/wp-admin/admin.php?page=snapshot_pro_snapshots&snapshot-action=new

    In simple words, your shared hosting package does not provide enough resources to perform such operations.

    On the other hand, you can still set up automatic backup generation via Softaculous. You can read about it here:
    https://www.namecheap.com/support/knowledgebase/article.aspx/1258/2182/how-to-work-with-scripts-in-softaculous

    We hope, that it explains why this plugin cannot be used. If you still have any questions or something is not clear, we will answer all the questions.
    --------------------------------------
    My response: The shared hosting package does not provide enough resources to make a routine update to my wordpress theme?

    There must be something else going on. We use this exact theme and same backup plugin on other domains hosted with Namecheap and have never run into this issue.

    Their Response: In our latest email we have analyzed backup generation only. If you do not have questions about that, we can move forward to theme update.
    --------------------------------------
    Their Response: We are glad to let you know that we managed to update the theme for your website. Please check it on your side.

  • Lindeni Mahlalela

    Hello Julie,

    I hope you are doing great today. Thank you for your feedback, it is really helpful.

    Unfortunately, I still can't create a backup here I still see get the 404 Not found error on the admin-ajax.php file. I have ran another backup creation process and while it was running, I went to cPanel to check what is going on and I noticed that when Snapshot is still backing up the database table the I/O Usage is at 800 Kb which is around half of the allocated 1.5Mb and once it starts reading the files the I/O usage shoots to the maximum 1.5Mb, at which point it returns the 404 Not Found error.

    I/O Usage Statistics

    404 Not found on admin-ajax.php

    Now quoting from their response:

    In simple words, your shared hosting package does not provide enough resources to perform such operations.

    I have checked the packages in their website and it does not say anything about I/O so we can't guarantee that upgrading your package will improve the performance. I have seen that the I/O usage is directly related to the issues experienced on the website because reading media files and creating a backup directly involves the input output system and as a result if the I/O is very low there will always be a problem.

    Would you also reach out to them and try to find out if the "404 Not Found" and the High I/O Usage can be solved directly by upgrading the package. If that is the case, then I can suggest you upgrade unless they say they can increase those limits without you having to upgrade to another package.

    I hope all this makes sense and hope it helps.

    Have a nice day.
    Mahlamusa