Snapshot give 504 error

Cannot run a Manged Backup, I'm getting 504 errors. Enabled debug log, but there isn't much info in the log regarding the issue.

Increased max_execution_time, but the issue still exists. Please advise what needs to be corrected to fix this.

  • Adam Czajczyk

    Hello Hannah

    I hope you're well today and thank you for your question!

    I have accessed and checked your site and tried to tweak it a bit to let Managed Backup complete. Unfortunately, to no success yet.

    The error that's showing up means that that the server powering the site is not able to process requests "on time". That might be a PHP timeout issue but 300 seconds (current "max_execution_time") should be enough in most cases. In fact it times out in much less than this, slightly less than 60 seconds.

    That would mean that "gateway" timeout is set most likely to 60 seconds so the "error flow" is like this:

    snapshot triggers some task -> gateway receives request and forwards it to the site -> site's processing it -> since it takes it more than 60 seconds the gateway times out and breaks the process.

    By "gateway" I mean OVH CDN: if you look closer at the errors screen after Managed Backup fails it shows that the connection is like: site -> OVH CDN -> server.

    Solving that will require either making the back-end server to respond much/process much faster or tweaking server settings so "gateway" wouldn't timeout so fast. I'm not sure what of this is possible by looking only at the site's back-end and FTP and it would be great if I could take a closer look at server configuration.

    I assume that there is some sort of server management panel at OVH that you can use. Could you please provide me with access credentials to it? To do it safely, please go to "WPMU DEV -> Support" page in your site's back-end and put login url and login credentials for that panel in the text box below the green "Access active fro 4 jours" button, then let me know here that they are there.

    I'll check the site again then to see how could we solve that.

    Kind regards,
    Adam

  • Adam Czajczyk

    Hello Hannah

    Thank you for your response.

    I'm sorry but I'm afraid that's of no help. I can't tell you exactly what should be changed in OVH because I do not know exactly what settings/configuration options are available there and that's why I asked you for an access to some sort of server management panel that they do provide. Usually there's also access to some additional insight into server configuration, server error logs, CDN/caching settings (if there are any) etc.

    At this point I can say that having such access I might be able to solve that or you will need to turn to your host anyway but at least I'll be able to tell what should you ask them for/about. However, with only the wp-admin and FTP access in this particular case I'm afraid further troubleshooting options are quite limited as I already checked everything that I could check and test this way.

    Kind regards,
    Adam

  • Predrag Dubajic

    Hi Hannah,

    I'm afraid that I can't access the log provided above, I tried using FTP login you provided in chat but it doesn't work for either that log or accessing your server, did you perhaps change these login details in the meantime?

    If you did can you please send us the new ones by using our contact form https://premium.wpmudev.org/contact/#i-have-a-different-question and the template below:

    Subject: "Attn: Predrag Dubajic"
    - FTP credentials (host/username/password)
    - Link back to this thread for reference
    - Any other relevant urls/info

    I see that you have quite a number of posts and media files on your site, and since it's a shared host it's possible that it has some server limitations that's causing Snapshot to fail due to the number of requests made during backup, that's usually what causes 504 error as that's a server side error.

    But I would like to try applying couple more tweaks to Snapshot settings to see if we could get it to work with the available resources.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Hannah,

    Thanks for sending those in, I was able to access your files now and do some extensive testing.

    After a number of tests and tweaks to Snapshot backup process, I was finally able to create a backup, but that also worked only when I excluded your uploads folder.
    And even then it didn't work each time, so that tells us that some of the server limits are being exhausted and don't allow the process to finish.

    Please get in touch with your hosting provider and ask them to check server logs to see which limits are being hit and if they can increase those for you so that full backup can be created.

    P.S. I have remove exclusion of uploads folder, but if you want to exclude and give it a try yourself you can do that by going to Snapshot > Settings and in Global File Exclusions field add this line:
    /wp-content/uploads/

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Hannah,

    The backup that I created includes your entire database as well as all WP files EXCEPT for the /wp-content/uploads/ folder, since backup couldn't finish with that included.
    So you will need to backup your uploads folder separately if your host is unable to increase the limits needed for full backup to finish.
    If you have cPanel or similar type of access to your files, you should be able to simply zip your uploads folder and download that to your PC as a backup.

    If you need to restore your Managed Backup you can go to your websites section here https://premium.wpmudev.org/hub/my-websites/ expand the Backups tab for the site in question and when you click on Restore button you can follow the instructions from popup window to restore it.
    Please note that backups are stored for 30 days and after that they are removed from our servers.

    Once your Managed Backup is restored you can simply unzip your uploads folder back to it's original location and that should be it.

    or to install it in another host?

    Snapshot is not a migration tool, and even tho we did have a number of reports from members using it this way it's not something we can guarantee it will work.
    That's why we're working on a new plugin specialized for migrations, you can find more info about that here:
    https://premium.wpmudev.org/roadmap/#wpmud-roadmap-product-shipper

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.