Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #533190

    Sorry, my English isn’t good,

    After updating to 3.4 version, server response time got worse. So I installed Query Monitor plugin, and I found out that accessing to Mailchimp API server was a problem. My web hosting server is located in South Korea, and query monitor shows that it tries to access Mailchimp API server which is located in USA.(According to Query Monitor, my web server tries to access to https://us12.api.mailchimp.com/3.0/)

    Because of physical distance between two servers, it took .27~.29 seconds for each HTTP request.

    I think when API Key field is empty, it’s not supposed to access API server. But somehow it tries to access API server when API Key is not entered, And this makes overall server response time around .50 seconds. And with API Key… it tries to access API server for three times, and it took more than .80 seconds by just API server accessing. Therefore, overall server response time took more than 1 seconds.

    So I’d like to know how to disable Mailchimp API server access.
    – I’m using WP 4.3.1 and Enfold 3.4.1 ( php 5.5.23 / mysqli 5.5.46 )
    – Other templates and old version of Enfold work fine.
    – Cache plugins could be solutions, but in this case those are temporary solutions. It would be nice if I can block API access.

    Thanks in advance for your help!

    • This topic was modified 4 years, 10 months ago by  dhtps.
    #534316

    Hey dhtps!

    If your not using Mailchimp on your site then it should not be making any requests. What happens when you deactivate the mailchimp plugin?

    Cheers!
    Elliott

    #534366

    Hi,

    There appears to be a serious issue with every page request making a call to the MailChimp API.
    Effectively every site that has the Enfold theme is forming a DDoS attack against MailChimp.

    This also impacts site performance as it adds ~0.2055 seconds to every page load.

    To fix this change the following code in:
    /wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/mailchimp.php

    From:

    
    			function popup_elements()
    			{
    				$api   = new av_mailchimp_api( $this->api_key );
    				$owner = $api->api_owner();
    
    				if(empty( $this->api_key ) || !$owner)
    

    To:

    
    			function popup_elements()
    			{
    				$api   = null;
    				$owner = '';
    				if ( ! empty( $this->api_key ) ) {
    					$api   = new av_mailchimp_api( $this->api_key );
    					$owner = $api->api_owner();
    				}
    
    				if(empty( $this->api_key ) || !$owner)
    

    Still further even if you did have an API key defined – it shouldn’t be making that call as much as it is and this should be reviewed.

    Cheers,
    Dean.

    #534538

    Hi, Dean !

    It works perfectly. Now my website doesn’t make any request to MailChimp API without API Key.
    Although it still makes triple request with API Key as you mentioned, but I believe Kriesi Team will handle this issue soon.

    Thank you for your help, Dean !

    #534760

    Hi!

    Thanks for noticing and informing us about that. I just updated the theme accordingly so that mailchimp only gets queried when you actually edit the mailchimp element. The udpdate will be available within a few hours on themeforest, once the review team has approved it :)

    Cheers!
    Kriesi

    #535190

    Hi, Kriesi !

    Thank you for quick update.
    Now newsletter feature works as intended without any performance issue! Thanks! :)

    #535468

    Thanks Kriesi!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘How to disable Mailchimp API server access’ is closed to new replies.