Snapshot backup restore causing 503 error

I'm trying to migrate my site from one server/domain to another. Whenever I try to restore a snapshot backup, I get a 503 error after reaching about 93%. I am using a Nginx server. My PHP set to the max execution time of 300. Server config: latest Nginx, Ubuntu 16.04, PHP 7.0. Please note I am not using a CDN.

  • OnlineBDesign
    • Design Lord, Child of Thor

    This is my error log

    2017/06/25 04:11:45 [error] 4140#0: *3 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 209.141.185.39, server: mydomain.com request: "GET /snapshot$ upstream: "fastcgi://127.0.0.1:9000"

    Hope this helps

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope you're doing good today! :slight_smile:

    Would you mind re-granting us with support access to the source website as it seems that got expired? Here's how: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-4

    We could then try to download the latest managed backup and try to migrate it in another testing server of ours.

    Let us know here in your next reply that access has been granted as we don't get any notifications about it.

    Take care,
    Dimitris

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope you're doing good today! :slight_smile:

    I just tried to restore the latest cloud backup of yours in a local website but I also got a error, this time a 504 (Gateway Time-out).

    I'm trying to restore in another live site this time and I'll let you know about my results (if this continues in my end, I'll also ping our SLS team to provide some more tests/insights).

    Warm regards,
    Dimitris

  • Dimitris
    • Support Star

    Unfortunately I was able to get the same error code 503 trying to migrate in another live server.

    I was a bit closer than you were (around 92% I think), but still the last requests didn't returned the desired outcome. I'm pinging our SLS team about this issue, me or another colleague of mine will keep you posted here as soon as we've got some valuable info about it!

    Cheers,
    Dimitris :slight_smile:

  • OnlineBDesign
    • Design Lord, Child of Thor

    Dimitris, thank you for the update.

    I get stuck at exactly 92% when trying to restore the full back up too.

    But also I'm getting to 72% while taking a full snapshot and I get 503 error after 10 minutes, the full snapshot doesn't complete. I'm forced to remove plugins from the list of components included in the snapshot in order for it to complete the snapshot.

    Hope this helps.

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope everything's going well for you! :slight_smile:

    This should be a matter of resources most probably then!
    Were you able to use normal snapshots and split your plugins in multiple snapshots?
    Have you tried restoring these? How did that perform?
    Please advise! :slight_smile:

    Warm regards,
    Dimitris

  • OnlineBDesign
    • Design Lord, Child of Thor

    Hello Dimitris,

    Thank you for the suggestion. I will try to do it piece by piece.

    It's not a resource issue because I spun up the same snapshot on a 2gig and a 4gig machine and it still gateway timesout.

    It would be nice if you guys could fix the issue, if anything for the sake of future deployment. I mean my project is under a gig... so it's small. If your migration tool doesn't work with my small project, there is no way I can rely on this technology when I grow.

    Thanks,

  • OnlineBDesign
    • Design Lord, Child of Thor

    I spend some time tonight testing things out. I cannot take a snapshot with strictly plugins or themes. I time out when I only select the two invididual for the snapshot.

    Either way, I cannot restore any snapshot sites to another domain, because the interlinking on the restore is still pointing to the old domain.

  • Predrag Dubajic
    • Support

    Hi OnlineBDesign,

    Could you provide us with cPanel and/or FTP access so we can investigate this further?

    You can send us your details using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Predrag Dubajic"
    - Site login url
    - WordPress admin username
    - WordPress admin password
    - FTP credentials (host/username/password)
    - cPanel credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi OnlineBDesign,

    I was actually able to restore your backup file on my installation, it did get stuck for quite some time on 92% but after waiting for about 30 minutes it finished properly.
    It was probably at the time it was restoring media and installed plugin/themes as there's over 200MB in both plugins and media folders and over 100MB in themes.

    So the issue here is most likely somewhere in server limitation that caused this and for further debugging I would like to consult our developers but they would need direct access to your server in order to investigate it further.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi Elwyn,

    This doesn't actually seem like it's directly related to the server resources but rather server settings.
    I was actually able to restore your snapshot file on a shared server which has quite limited resources, what I did notice is that backup file itself is missing some of the files, so I actually had re-install WP with missing files to get it somewhat able to load.

    So, the issue with restore on your site could be due to some server limitations in settings, or that Cron jobs are failing.

    As for the backup file itself, did you had any exclusions in Snapshot when this was created or did you see any errors during the process?

    Best regards,
    Predrag

  • OnlineBDesign
    • Design Lord, Child of Thor

    Predrag, your team was able to generate the same gateway timeout as per the previous post. What did you guys do to get it to go to the end?

    Snapshot fails on both themes standalone and plugins standalone. So this gateway timeout isn't only a problem with the full backup and restore. As mentioned earlier in this thread.

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope you're doing good today! :slight_smile:

    It seems that we were both confronting some issues, despite the fact that we've used completely different environments (I've used a Local by Flywheel and a shared SiteGround server).

    As my colleague Predrag mentioned above, the issue with restore could be due to some server limitations in settings, or that Cron jobs are failing. I was unable to make this work in my test sites, that's why I'm kindly asking for some server credentials along with some WP admin access, so we could further compare/investigate that and propose some workarounds here.
    As this is public forum, you should send us your details through our safe contact form https://premium.wpmudev.org/contact/#i-have-a-different-question using this template:

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

    Keep in mind the subject line as ensures that it gets assigned to me.

    Warm regards,
    Dimitris

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope you're doing good today! :slight_smile:

    As we've started debugging the managed backup issue, I can see that now managed backups are disabled.
    I've already accessed your server and made the following additions in wp-config.php file of this installation.

    // Enable WP_DEBUG mode
    //  https://premium.wpmudev.org/blog/debugging-wordpress-how-to-use-wp_debug/
    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);
    
    // https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP
    define('WP_MEMORY_LIMIT', '256M');
    define('WP_MAX_MEMORY_LIMIT', '512M');
    
    // Snapshot definitions
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 10);
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_USE_PRECACHE', true);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600); //~100MB

    Could you please re-enable Managed Backups and grab a new backup?
    Let me know when this is finished so I could try to restore this once again.

    Warm regards,
    Dimitris

  • OnlineBDesign
    • Design Lord, Child of Thor

    Dimitris,
    I have enabled backup on my digitize project. Just so we are on the same page I'm trying to move my project at advi to digitize. So the backup I'm trying to restore on digitize is a backup from advi project.

    Are we on the same page?

  • Dimitris
    • Support Star

    Hey there OnlineBDesign,

    hope you're doing good today! :slight_smile:

    Could you please respond to our previous email conversation and share some server access for "advi" website too?

    I'll need:
    - WordPress admin (login url/username/password)
    - FTP/SSH credentials (host/username/password)
    - link back to this thread for reference
    - any other relevant urls

    Keep in mind the subject line as ensures that it gets assigned to me.

    Warm regards,
    Dimitris

  • Dimitris
    • Support Star

    Dear OnlineBDesign,

    I've escalated this to our SLS team (Second Level Support) as I was still able to replicate this issue in a local nginx installation (made via Local by Flywheel), despite the fact that I've tried to raise max_execution_time to higher value (tested with 900 and 1800).
    Still, my colleague Predrag was able to restore this in a local MAMP and a shared hosting server, so this should be some kind of server setting (nginx maybe?) that should involve here...

    Me or another colleague of mine will keep you posted here, as soon as we've got some valuable feedback.

    Warm regards,
    Dimitris

  • Ivan
    • Developer

    Hi OnlineBDesign !

    It seems grant access to your site was expired.
    If you provide me with additional login credentials, I can look into it more.

    https://premium.wpmudev.org/contact/#i-have-a-different-question
    Please visit our private Contact page and complete the form with the following information:

    Subject: "Attn: Ivan Svyrskyi"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - Admin login:
    Admin username
    Admin password
    Login url

    - FTP/SFTP credentials
    host
    username
    password
    (and port if required)

    Note: Don't send any credentials via this forum because it's public forum.

    Also, I checked your provided SSH credentials and there are no any WP installations. Could you check it?
    Also, I asked Dimitris for his WP and FTP credentials but it will be better to resolve this issue first hand.

    Best regards,
    Ivan.

    • OnlineBDesign
      • Design Lord, Child of Thor

      Ivan,

      It's hard to believe that after a month of silence on this ticket, that access to my sites has expired. Shocking!

      All my credentials have been shared with your team. Please consult with Dimitris for all your credential needs. The WordPress installations have not moved anywhere, so you should be able to find them where I left them before.

      Additionally, I had to go ahead and manually move my projects since this ticket was raised over 2 months ago. So I don't want you guys messing with my setup anymore. In fact please go into my setups and delete your debugging codes and any additional modifications you made.

    • OnlineBDesign
      • Design Lord, Child of Thor

      I apologize for coming off abrasive... but I'm really not happy with the level of customer support that has been conducted on this ticket.

      A major backup and restore feature not functioning properly in LEMP setup should have received a higher attention and communication.

      Nothing personal Ivan, not your fault.

  • Ivan
    • Developer

    Hi OnlineBDesign !

    I'm sorry for that. I had not accesses to your sites and Dimitris says that he changed only WP_MEMORY_LIMITs and snapshot definitions in wp-config.php. We can restore it after getting access to your site. Could you please enable support access again? Dimitris provided me your ssh credentials but there are a lot of folders there and we don't know where is your WP installation situated and we can't check each folder.
    We really want to figure this issue out and Dimitris mentioned that he could replicate this issue with your backup but it's work fine in other cases but unfortunately without access, we can't replicate this issue now.

    Best regards,
    Ivan.

  • OnlineBDesign
    • Design Lord, Child of Thor

    Hello Ivan,

    I have turned off debugging.

    What is the recommended default configuration for snapshot?

    The current config is

    // Snapshot definitions
    define('SNAPSHOT_FILESET_CHUNK_SIZE', 10);
    define('SNAPSHOT_TABLESET_CHUNK_SIZE', 100);
    define('SNAPSHOT_FILESET_USE_PRECACHE', true);
    define('SNAPSHOT_FILESET_LARGE_FILE_SIZE', 104857600); //~100MB

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.