Connection timed out for Snapshot and Managed backups

Hi,

I've been trying to create a snapshot and managed backup of indulgebodyandmind.com for almost a week now while trying different settings but it always fails when it reached plugins and 87%. I get an error 'Connection timed out'. I'm running PHP 7.0 and I have a level 3 CPU. I've also added the below to my htaccess and wp-config files but it always fails.

All my plugins are up to date and PHP 7.0 compliant. I'm also running the latest version of WP.

HTACCESS
<IfModule mod_substitute.c>
SubstituteMaxLineLength 10M
</IfModule>

<IfModule mod_php5.c>
php_value max_execution_time 300
php_value max_input_time 1000
</IfModule>

WP-CONFIG

/** Increase Memory limit to 512M */
define('WP_MEMORY_LIMIT', '512M');

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

define('WP_CACHE', true); // Added by WP Hummingbird
/* That's all, stop editing! Happy blogging. */

How can we get this to work?

Cheers

  • Huberson

    Hello Simon
    Although the size of the site is relatively small(~76MB) the process took almost an hour to complete. I was able to perform a complete backup on the site with Managed Backup. But local snapshot still timeout as you mentioned at the plugins.

    The available server resources(memory, CPU, execution time..) you posted above look fine, the issue could be with the server network(bandwidth) limit which might be causing the timeout.
    I would suggest trying to increase PHP max execution time a bit to 500 and maybe doing the backup with plugins deactivated.

    If still getting the timeout, send over the following info using our contact form and we'll take a deeper look at it:

    Subject: "Attn: Huberson Dorvilus"
    -WordPress admin username
    -WordPress admin password
    -login url
    -FTP credentials (host/username/password)

    -link back to this thread for reference

    -any other relevant urls

    Regards,
    Huberson

  • Huberson

    Hey there Simon
    Thanks for sending over the details. I've added these lines to your wp-config.php file to modify Snapshot behavior a bit:

    /*Snapshot managed backup temp. fix */
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600);
    define('SNAPSHOT_FILESET_USE_PRECACHE', true);
    define('SNAPSHOT_FORCE_ZIP_LIBRARY',  'pclzip'); // try pclzip or archive

    I've made a few backups to make sure it works but do test Managed Backup and regular snapshot with different destinations to check that they're working properly as well.

    I've noticed that your disk storage is a bit low, if storing snapshot locally it might be worth increasing that a bit to avoid issues on the future.

    Cheers,
    Huberson

  • Kasia Swiderska

    Hello Simon,

    Above defines are used to adjust how much resources at time Snapshots needs - this will make whole process longer, but will "eat" less resources.

    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);

    In most situations this backup process will attempt to backup the table in one step. But on some server configurations the timeout is set very low or the table size is very large and prevents the backup process from finishing.
    To control this, the Snapshot backup process will breakup the requests into smaller ‘chunks of work’ requested to the server. By default chunk is 1000 - with above define it is limited to 100.
    Define "'SNAPSHOT_FILESET_CHUNK_SIZE'" does the same but for files.

    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600);

    That one makes sure if there is big file processed it will be logged into logs - it helps with establishing then if backup is stuck on very big file.

    By default, the list of files is scanned on beginning of each files-processing backup step. When "SNAPSHOT_FILESET_USE_PRECACHE" setting is enabled, this is done only once and the list is cached. Each subsequent steps will work off this cache.

    define('SNAPSHOT_FORCE_ZIP_LIBRARY', ‘pclzip’);

    This one forces method of creating zip archive. pclzip can be more efficient method form some servers. They are useful most often on shared hostings.

    kind regards,
    Kasia