I'm trying to do my first backup of a MU site using

I'm trying to do my first backup of a MU site using Snapshot, and it stalled at 92% of plugins and produced the following error:

Gateway Time-out: The gateway did not receive a timely response from the upstream server or application.

I'm backing up to S3.

How do I fix this error? Thanks.

  • Adam Czajczyk

    Hello Doc,

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

    This error doesn't come directly from Snapshot Pro plugin but rather from the PHP instance running on a server. It generally means that after the server sent a request to remote gateway (in this case it would be S3 cloud servers' endpoint) it didn't get a response fast enough.

    That's because PHP configuration puts limits on waiting time, otherwise it could wait indefinitely and as a result block your site or even entire server.

    The reason the S3 isn't able to respond fast enough is not clearly defined. It can be a slow internet connection on your server's side, the connection could have been "clogged" at this very moment (slowing down just for a few seconds), it could be down for a moment or WP could hang up for a second or two.

    That said, I think you cold try to adjust PHP settings to allow more time for connection. In case you're using cPanel or DirectAdmin to manage your hosting account, please look for "PHP Settings" section and locate the "default_socket_timeout" settings there.

    Most likely, it's by default set to "60" (seconds), so try to increase it up to e.g. "300" seconds.

    If you can't find PHP settings in your hosting panel, please create an empty "php.ini" file in a root folder of your WP install and put the following lines there:

    default_socket_timeout = 300
    max_execution_time = 300

    Let me know if it helped, please!

    Best regards,
    Adam

  • Doc

    It turns out that using cPanel to increase the timeout creates and writes the php.ini file, and I had the same problem in exactly the same place: 92% of plugins.

    The one thing that was different in the php.ini file that cPanel created was that it included a couple of zend_extension variables:
    zend_extension=/usr/local/php56/lib/php/extensions/ioncube.so
    zend_extension=/usr/local/php56/lib/php/extensions/ZendOptimizer.so

    Obviously it didn't make any difference. So what's my next step?

  • Predrag Dubajic

    Hi Doc,

    Once the backup reached 92% can you tell us which plugin it stops at?

    Have you tried switching from ZipArchive to PclZip from Snapshots > Settings and see if it will be able to create the snapshot after that?

    If that doesn't work, would you mind allowing support access so we can have a closer look at this?
    To enable support access you can follow this guide here:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Best regards,
    Predrag

  • Adam Czajczyk

    Hello Doc,

    Thanks for all your efforts and for granting an access.

    I've tested this myself and also checked your site settings. It seems that on the contrary to what I suggested before it is not external server (meaning Amazon S3 cloud) but your server that's not giving response to Snapshot's AJAX request in time.

    As my colleague @Predrag Dubajic suggested, this would mean that one of the plugins stands in a way. As for "calling in the big guns", I think the essential step now would be to find out which plugin is making backup "stuck in a place" and knowing this we could further investigate the issue.

    In order to find out the "guilty" plugin, the full plugin conflict test would be necessary. To perform it, please follow these steps:

    1. disable all plugins except Snapshot
    2. run Snapshot (by entering "edit" screen, changing Backup Interval option to "Run Immediate" and saving settings)
    3. assuming that the process went fine this time -
    4. enable first plugin on the list
    5. run Snapshot
    6. repeat steps 3 - 5 until Snapshot gets stuck again

    At this point you should have the main culprit identify. Let us know about it and I hope we'll be able to find a fix for it asap.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.