Snapshot backups issue

Snapshot says – "An unknown response returned from Snapshot backup attempt. Aborting. Double check Snapshot settings." And I have checked.

This is related to the "normal backups" not Managed backups

  • Nastia

    Hello Stina

    I hope you are doing well!

    During teh troubleshooting the following error appeared:
    PHP Fatal error: Out of memory (allocated 108003328) (tried to allocate 12288 bytes) in

    Which means that during the backup process the site's resources run out of memory. I've added the following changes to the wp-config.php file:

    define('WP_MEMORY_LIMIT', '1024M');
    define( 'WP_MAX_MEMORY_LIMIT', '3000M' );
    
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 10);
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600); //~100MB
    if (!defined('SNAPSHOT_FORCE_ZIP_LIBRARY')) define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip');
    if (!defined('SNAPSHOT_IGNORE_SYMLINKS')) define('SNAPSHOT_IGNORE_SYMLINKS', true);

    - The WP_MAX_MEMORY_LIMIT defines the maximum memory limit.
    - The CHUNK_SIZE force the Snapshot plugin to create smaller parts of the backup file
    - The LARGE_FILE_SIZE skips files larger than 100MB

    Unfortunately, this issue still persists. I've flagged the second level support in here, so they could have a closer look at your site.

    Please note, our developers' response time is longer-than-normal compared to support staff response times.

    Have a nice day and take care!

    Kind regards,
    Nastia

  • Lindeni Mahlalela

    Hello Stina

    I hope you are doing great today. Thank you for your patience while we were looking into this.

    In addition to what my colleague Nastia have done, I have looked in to your files via FTP client and noticed that there are some files that may be excluded in the Snapshot to make the Snapshot lighter and the process quicker.

    I have found a file called 'db.php' the name looks like a php file but it is actually a shortcut to a folder, I have added this file to the Global File Exclusions list in "Snapshot > Settings" page, I suspect that this file was acting as a link to other files but was not be skipped due to the way it was created and due to file permissions on this file.

    I also commented out the following lines in the wp-config.php file:

    //define('WP_MEMORY_LIMIT', '1024M');
    //define( 'WP_MAX_MEMORY_LIMIT', '3000M' );

    In most cases and in most websites it might be a good idea to add those lines and raise memory limits but in some cases especially with shared hosting and servers with limited resources,s specifying high limits may tempt some scripts to over allocate memory causing Fatal error in the script and thus crashing the web site.

    I have noticed that there are various plugins on your website that run out of memory even with those high limits, this also includes WordPress core files. See the following log entries in debug.log:

    PHP Fatal error:  Out of memory (allocated 77070336) (tried to allocate 12288 bytes) in plugins/wordpress-seo/inc/options/class-wpseo-option-wpseo.php on line 155
    PHP Fatal error:  Out of memory (allocated 49020928) (tried to allocate 64 bytes) in wp-includes/functions.php on line 5078
    PHP Fatal error:  Out of memory (allocated 38797312) (tried to allocate 12288 bytes) in plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/lib/shortcodes.php on line 60
    PHP Fatal error:  Out of memory (allocated 57671680) (tried to allocate 12288 bytes) in plugins/wp-views/inc/wpv-admin-ajax.php on line 861
    PHP Fatal error:  Out of memory (allocated 57409536) (tried to allocate 49152 bytes) in plugins/wp-views/inc/functions-core.php on line 578
    PHP Fatal error:  Out of memory (allocated 58720256) (tried to allocate 12288 bytes) in plugins/wp-views/embedded/inc/wpv-query-debug.class.php on line 259
    PHP Fatal error:  Out of memory (allocated 57933824) (tried to allocate 12288 bytes) in plugins/wp-views/inc/wpv-admin-ajax.php on line 2751
    PHP Fatal error:  Out of memory (allocated 96468992) (tried to allocate 3072 bytes) in plugins/formidable/pro/classes/controllers/FrmProEntriesController.php on line 2287
    PHP Fatal error:  Out of memory (allocated 101974016) (tried to allocate 87 bytes) in wp-includes/post.php on line 1418
    PHP Fatal error:  Out of memory (allocated 69206016) (tried to allocate 49152 bytes) in plugins/wp-views/embedded/inc/wpv-import-export-embedded.php on line 3149
    PHP Fatal error:  Out of memory (allocated 67895296) (tried to allocate 49152 bytes) in plugins/wp-views/inc/sections/wpv-section-layout-template.php on line 374
    PHP Fatal error:  Out of memory (allocated 103809024) (tried to allocate 1280 bytes) in plugins/snapshot/lib/Snapshot/Model/Destination/aws/AWSSDKforPHP/services/s3.class.php on line 2447

    This was happening even with high memory limit. So if the memory limit is too high and the PHP scripts end up allocating more than the server can handle then it becomes a problem so I decided to comment out the memory limit and roll back to server defaults which means the new limits will be:

    WP_MAX_MEMORY_LIMIT = 1024M
    WP_MEMORY_LIMIT = 40M

    This will avoid overloading the server's memory.

    Now, after doing these changes I have successfully created three local Snapshots, see the screenshot below:

    Please try and create another Snapshot and see if it works for you. Please let us know if that helps or if you have any further queries. We will always be happy to assist in any way possible.

    Have a nice day.
    Mahlamusa

  • Lindeni Mahlalela

    Hello Stina

    I hope you are doing great today, I am sorry for the delayed response from our side and hope that didn't cause any issues on your side.

    I have checked your website and checked Snapshot's configuration and noticed that the code that was added by Nastia was removed from the wp-config.php file and that could have been the reason Snapshot was no longer working properly. I have also noticed that the Snapshot was deactivated from "Plugins > All Plugins" so I went ahead to activate it so I can do some tests.

    I have added the following code back to the wp-config.php:

    define('SNAPSHOT_FILESET_CHUNK_SIZE', 10);
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600); //~100MB
    if (!defined('SNAPSHOT_FORCE_ZIP_LIBRARY')) define('SNAPSHOT_FORCE_ZIP_LIBRARY', 'pclzip');
    if (!defined('SNAPSHOT_IGNORE_SYMLINKS')) define('SNAPSHOT_IGNORE_SYMLINKS', true);

    And then attempted to run create a backup. The backup was successful and if you check you should see a new backup that was created today.

    Backup Created Successfully:

    Snapshot Info:

    Could you confirm if you manually removed the code from the wp-config and manually activated Snapshot. If you have manually deactivated the plugin and removed the config code in wp-config.php then let us know so we can cleanup. I have left the plugin active for now so you can test it yourself.

    I hope this helps. Please let us know if you need any further assistance with regards to this.

    Have a nice day.
    Mahlamusa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.