User syncing throws error at the beginning and stops after 40 to 50 users synced

When triggering user sync from master site http://eunamed.com, it stops after syncing around 40 to 50 users.

Also, when just starting syncing, we get an error as you can see in the screenshot attached in the next message.

Im also attaching in the next message the error logs indicating which one's mastersite and substie.

  • Adam Czajczyk

    Hello!

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

    I checked both sites and reviewed logs, however these logs unfortunately do not carry any meaningful information in this case. It looks like the connection/communication between the sites just "broke" so it would be best to investigate it further.

    First step though would be to make sure that both your sites run at at least 256M of memory limit. Th master site does have it set to that amount but the sub-site is set to 40M. Therefore please start with adding following line to the "wp-config.php" file of the sub-site:

    define('WP_MEMORY_LIMIT', '256M');

    Then please enable WordPress debugging on both sites: master and sub-site. You may do this by adding following lines to the "wp-config.php" files of the sites:

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    Make sure please that all these lines are located above the "/* That's all... */" line.

    Once this is done, please try to sync users again and see how far it goes. Then please download the "/wp-content/debug.log" files from both sites, rename them to "debugm.txt" (for master) and "debugs.txt" and attach to your replay here.

    Best regards,
    Adam

  • Adam Czajczyk

    Hello!

    What I suggested shouldn't be causing the 504 issue and I'd rather suppose that it was either an "unlucky coincidence" or there was some error in these lines where or... it was actually a clue on what is going on there and why the synchronization breaks.

    That 504 error appeared on master site, is that right? It usually means that the other site has timed out. For example:

    - your site is fetching some data from other site
    - server of that other site breaks down and it doesn't respond
    - your site gives 504 error.

    In that case that could suggest that the issue is because of the sub-site. Do you think it would be possible to temporarily disable all the plugins - except User Sync - and switch to default (Twenty Fifteen or Twenty Sixteen) theme on the sub-site and try synchronization again? There's a chance that this would decrease the "load" of the sub-site and could hopefully show if its related or not.

    Would you be able to give it a try?

    Best regards,
    Adam

  • Cultiva Tus Ideas

    During this thread, i asked via live support chat to one of your colleagues about an email being sent to every user on syncing. He said no email was being sent to the users on syncing, so i tried syncing a few times, just to notice now there WAS an email being sent.

    As a result of this i have being bothering some of our users with junk mail, causing confusion and frustration.

    Lastly we decided to just copy wp_users and wp_usersmeta from the master-site to the sub-site and that brought the users to the sub site.

    We would love to figure the problem with your plugin out, but for this time we managed to import the users (which is what we needed) and dont want to risk on keep bothering them with unwanted emails. So sorry, but we won't keep trying with this plugin for now.

    Thanks anyway, hopefully the information given will lead you to discover whats wrong and prevent it from keep happening in the future. If are we able to help on this, please count on us.

    Cristian P.
    CTI Team

  • Predrag Dubajic

    Hi Cristian,

    Sorry to hear you had to go with a manual workaround for this :slight_frown:

    Initial sync does require more resources so when doing it it's best setting both memory limit and max execution time to highest available values your server allows.
    After the that is done and initial sync is completed you can restore those values to default ones you had and it should continue working with that.

    During this thread, i asked via live support chat to one of your colleagues about an email being sent to every user on syncing. He said no email was being sent to the users on syncing, so i tried syncing a few times, just to notice now there WAS an email being sent.

    User Sync shouldn't be sending out emails on adding new users, and when testing it now on my installation there were no emails sent, it's possible that another plugin or theme you have installed on your site is overriding this and sending out the emails.

    Hopefully User Sync will be more of a use in your future projects :slight_smile:

    Best regards,
    Predrag

  • Cultiva Tus Ideas

    Thanks for for concern Predrag. Next time i will try what you say first, but to be honest i did not see that hint in the plugin docs nor in the usage section.

    This may be a good recommendation to sync large amount of users.

    In this case we're working (trying to sync users) between 2 WP installs living in the same dedicated WP managed server (at WP Engine).

    If possible, i'll keep this ticket open until try that solution.

    Thanks a lot!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.