Clone tool taking too long and most of the time it give 502 error

Hi,

I am using your clone tool and its taking too long to start cloning process and most of the time it gives 502. When I say too long its does not mean cloning time. When we filling out all information and press start, then it take ages to go to cloning page and most of the time it throws 502 error. I have my site hosted on WPEngine . I have also attached error log file, please check and kindly fix this issue ASAP. Thanks

  • Adam Czajczyk
    • Support Gorilla

    Hello chriscarpenter,

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

    I checked the error log but it doesn't seem to carry any information that could help here. I would like to check that on your end so could you please grant me a support access to your site?

    You can do this using our WPMU DEV Dashboard plugin as described in this guide:

    https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-4

    I understand that you were attempting to clone the sub-site of ID 17 so does this apply to this sub-site only or to any sub-site that you try to clone?

    Let me know please.

    Kind regards,
    Adam

  • Dimitris
    • Support Star

    Hey there chriscarpenter,

    hope you're doing good and don't mind chiming in here! :slight_smile:

    I just got in and managed to clone subsite with ID=17 (the one that got reported in error_log file) in a new subsite (dimitriswpmudev.your-domain.com) without any issues.

    I presume that these glitches are coming from your server setup and maybe it's a matter or resources. I'd rather advise the hosting provider about it and if there is any way that you can surpass the current 256MB limit of PHP.

    In case this continues, please activate WP_DEBUG as it may provide additional information. Simply access your server via FTP, edit the wp-config.php file, find a line like
    define('WP_DEBUG', false);and replace it with the following (if the above line doesn’t exist, simply insert next snippet just above the /* That's all, stop editing! Happy blogging. */ comment)

    // 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);

    Then go ahead and try to replicate the 502 error.
    By doing so, a /wp-content/debug.log file should be created.
    Simply download it, rename it to debug.txt and attach it here in your next reply. If size of text file exceeds the 5MB limit of our forums, please use a service like Dropbox and post the shareable link instead.

    Warm regards,
    Dimitris

  • chriscarpenter
    • Site Builder, Child of Zeus

    Hi,

    I just try to clone and it gave me 502 error again, so I have attached a log file.

    In log just forget the beginning errors from gravitysync as they are from other plugin. In your plugin why its running select all query on blog that is not created yet?

  • Predrag Dubajic
    • Support

    Hi chriscarpenter,

    I tried cloning a custom subsite and main site on your network and they both finished without 502 error.

    Since the 502 error is usually server related but it doesn't happen to me when I check your site I think that this might be related to the time of when you perform clone process.

    If you're doing cloning during hours with high number of visits it's possible that the server limits are reached and that's why it breaks.

    Can you try performing cloning process during low site visit and see if it works in that case?

    Best regards,
    Predrag

  • chriscarpenter
    • Site Builder, Child of Zeus

    Then for you reply. Can you please speed up your response its too slow. I need to fix this issue ASAP.

    Ok we do not have high volume of visitors. its only 61 visit per day. And what about debug log I have sent you. I think its taking time because of those errors that trying to select table record that is not yet been entered. Please reply ASAP. I am sure issue it not related to the volume of traffic.

  • Predrag Dubajic
    • Support

    Hi chriscarpenter,

    Apologies for the delay, we're dealing with hundreds of questions each day and we try to get back to everyone as soon as possible.

    I did see the DB errors in your log but I've performed two more cloning processes after that and both were successful and there were no new values added to your debug.log.

    Also, I just tried performing the cloning process again and it did took some time to start but it finished successfully again, there's a time to first byte wait time that was over a minute and that's usually server related, I've found couple of reports that this could be caused by WP Engine object caching.

    It looks like that WP Engine caching can't be disabled on live site but on staging site it's disabled by default.
    Could you create a staging site and check the behaviour of cloning process on there?

    Best regards,
    Predrag

  • chriscarpenter
    • Site Builder, Child of Zeus

    Hi first of all I have disable log just after I've attached it here, that is why you are not able to see any logs. I have also open ticket on WPEngine and they said revslider is taking 90% of time in that process. Another thing the told me is that they have set 60 second processing time of script that is why we have 502 error because it taking more than 60 seconds. I am now try to clone another site with revslider disabled and let see what happen. Thanks.

  • chriscarpenter
    • Site Builder, Child of Zeus

    I have disable revslider and then after pressing clone it was super fast going to the clone process page. So I think WPEngine was right the revslider was the culprit. Can you please clone it from your end and confirm what I am saying. Thanks.

  • Adam Czajczyk
    • Support Gorilla

    Hello Chris!

    I have accessed your site, double-checked if RevSlider is disabled and then cloned site id 17 to a new site ("wpmutestadam").

    Site was created as expected, no ajax call took more than about 0,7-0,8s and entire process completed in about 28 seconds.

    Then I gave it another go on my test multisite. Without revslider one of my sub-sites was fully cloned in about 8 seconds. With revslider enabled the process was much slower and I had to wait much longer for it to start. The site used much more resources and I believe it might be casing script time outs (resulting in 502 errors, thus broken cloning process) on some servers with more strict configuration than mine.

    On my end I got max_execution_time set to 300seconds and my test sites receive nearly no traffic so that would explain why it didn't break but I think Slider Revolution would be the main culprit here then, however it's a matter of how "resource hungry" it is and of server's limitations.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.