The problem manifests itself as the mailchimp signup block being "unclickable" because disabled=TRUE is set in the HTML.

When this happened, I also saw the error The subscription service is currently unavailable. Please try again later.

Which you can see his happening here:

    if (empty($lists)) {
      drupal_set_message($this->t('The subscription service is currently unavailable. Please try again later.'), 'warning');
    }

And could be caused some sort of bad caching in the following:

function mailchimp_get_lists($list_ids = array(), $reset = FALSE) {
  $lists = array();
  $cache = \Drupal::cache('mailchimp');
  $cached_data = $reset ? NULL : $cache->get('lists');

  // Return cached lists.
  if ($cached_data) {
    $lists = $cached_data->data;
  }

This may have to do with us not doing a cache clear after config import.

But we are currently adding the following to our deploy process to see if it fixes:

drush eval "mailchimp_get_lists(array(), TRUE);"

One problem we have is that the error is inconsistently replicated.

We'll report back here.

Comments

glass.dimly created an issue. See original summary.

samuel.mortenson’s picture

Status: Active » Postponed (maintainer needs more info)

@glass.dimly Any update about this? Doing a cache rebuild after config import is normal but I'd like to know if this is still happening because I haven't seen this before.

perke’s picture

Happens to me on D7 using mailchimp module 7.x-5.4, after deploying to platform.sh form in block is disabled with `disabled` attribute on input field.

I'm doing `drush cc all` at the end of deploy hook so not sure is it related to caching.

on mailchimp config page, I see "Failed connecting to the MailChimp backend with the provided API key." and am sure that key is ok.

also, there are log entries for mailchimp:

- An error occurred requesting list information from MailChimp...... and it ends with "Request Blocked. We had to block your request because of something that looked suspicious. Please reach out to support:"

this is usually followed by php notice:

Notice: Trying to get property of non-object in mailchimp_signup_subscribe_form() (line 326 of /sites/all/modules/contrib/mailchimp/modules/mailchimp_signup/mailchimp_signup.module).

Takes around 10-15 minutes to get back to normal and establish connection with mailchimp. Can also confirm that the error is inconsistent.

samuel.mortenson’s picture

Status: Postponed (maintainer needs more info) » Active

@perke Have you reached out to Mailchimp support per the log entry? I'm wondering if Platform.sh is blocked or rate limited in some way.

perke’s picture

Not yet, but I posted question on Platform's slack support channel just to see if it's something they've seen before. I'm guessing it has to do with something changed during deployments, like header requests/fingerprints or similar that triggers mailchimp security.

Will follow up here if I get any more info.

perke’s picture

Just heard from Mailchimp Support, and forwarding here in case it can help:

"... that error messaging you shared looks to be a blockage we see with our upstream service provider, Akamai. Because of their status, there's no way for us to control how they manage all the connections they do, but it looks like it's seeing some suspicious activity on or around your store domain's IP address. Hang tight while I dig into that..... it looks you are definately seeing an Akamai block for your server/store IPs when you make these connections. As I said, we can't remove these, but they do often resolve themselves given time without that offending traffic. Have we tried changing IP addresses as of yet? ... And what I mean is that your store or integration through Drupal is using a specific IP to make the connection, but that IP is looking to give Akamai some concern at the moment- changing that IP would be the next step if you didn't want to wait this error out."

so they suspect Akamai is blocking requests and thus our connection to mailchimp is broken which renders our signup form unusable for around 30ish minutes after each deployment to production.

I'm currently in contact with Platform.sh support on this and will get back here if more info is available.

samuel.mortenson’s picture

Thank you @perke! Even if there's not much for us to do here this will be great documentation for other users.

yvmarques’s picture

@perke do you have any information from Platform.sh regarding this, we also encounter this error.

tim-diels’s picture

I'm also experiencing this issue but not using Platform.sh. As stated in #6, I got the same reply from Mailchimp.

Still trying to figure out what happens and how to solve this.

gcb’s picture

Status: Active » Closed (works as designed)

This does not appear to be an issue with the module, but rather something specific to Mailchimp's service. As such, I'm marking this "works as designed".