[Multisite Integration] Too many API calls

I'm using a plugin from WPMU Dev called "MailChimp Integration/MailChimp Sync" on a new multisite of mine. I'm getting some crazy crazy traffic from 3 IPs. 35,000 hits and up inside of 24 hours. After checking the IPs, they are ALL Mailchimp IPs.

After investigating the logs, this plugin is doing API calls and pulls at an alarmingly rapid rate and it's making my server performance suffer very badly.

This multisite has about 50 template sites, but only 10 or so live sites thus far and its traffic is fairly low. I was given this info from the server team at Cloudways who found the problem.

Is this an issue in the plugin side of things or the MailChimp API itself?

  • Konstantinos Xenos

    Hi Micha !

    After doing some tests on my dev environment and inspecting your MailChimp Logs I saw that you're having a massive amount of callbacks from MailChimp WebHook on any profile update ( pretty much an infinite loop ) and I think I've figured what is causing the issue.

    I'm attaching a relevant screenshot as well for the explanation:
    1) Go to your MailChimp Account -> Lists and select the List that you have registered in the plugin.
    2) Select Settings -> Webhooks and deselect the via the API option.

    To explain the issue a bit:
    When a profile update happens inside WordPress, MailChimp Integration sends an update to your List so the member can be updated ( i.e. name, last name etc ). When an Update happens on MailChimp it as well sends a call via the WebHook so the WordPress profile can be updated as well ( for example when a subscriber chooses to change his name 'after' he has subscribed via editing his mailchimp details ).

    When the via the API is enabled, it creates an unwanted 'loop' because 'both ends are trying to update the other respectively' so WP sends the update to MC and because MC gets an update it tries to push back ( as it's an API call ) the update via the WebHook and it goes on and on since both are getting updated all the time.

    To easily test this:
    Go to your WordPress -> Settings -> MailChimp -> Logs.
    Open a new tab and Edit your User profile, change your Name and click Update.
    View the Logs, they should be generating a lot of "PROFILE: profile updated:" like being in a loop.

    Go to your MailChimp Account and remove the Option that I mentioned as seen in the screenshot.
    Edit & Update your user again.
    You should NOT see any new entry for this profile since the user was updated via WordPress. An entry should be ONLY created when an update happens on the MailChimp side.

    ---

    I will inform our Devs just in case there's something we can do from our side as a cross-check on this, but I'm pretty sure we can't avoid it since the trigger is within MailChimp's settings.

    I hope this resolves the issue on your end as well. Please inform me if this helped !

    Regards,
    Konstantinos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.