function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sara LandisSara Landis 

MailChimp batch apex jobs stuck in holding

I have spent the last week working with Mailchimp to troubleshoot the MailChimp for Salesforce plugin, which is no loner syncing contacts from Salesforce onto our MailChimp list. MailChimp tech support has requested information from Salesforce Support in order to proceed with the troubleshooting. As a standard customer, I have been told the only way to access any support is through this forum, so I am hoping someone has insight!

What we know:
• Users of the MailChimp for Salesforce integration are experiencing an error that “a batch job is already in process”.
• From what we can see, these batch jobs are in a ‘holding’ state in the Apex flex queue, and are never moved to the Apex job queue for processing.
• In order to protect org resources, MailChimp integration will not start a second batch job if a MC4SF batch is already in the apex queue.
• We have established that there are no other apex jobs currently running that would cause the hold in the flex queue.
• Since we can verify that these batch jobs are being created successfully, the issue appears to be with how they are being handled for processing in these queues, which is a function controlled exclusively by Salesforce.

MailChimp support has asked me to find out:
• What could cause a job to remain in a ‘holding’ state in the flex queue?
• Is there anything that would prevent a batch job from being able to move from the flex queue to the job queue?
• Is there anything unique to this specific org or the Apex flex queue that would prevent these jobs from running as expected?
Best Answer chosen by Sara Landis
InjureFree SupportInjureFree Support
For those looking for the solution to Sara's issue (not the other issue introduced later in the thread), here's a way to get this fixed.  If you don't have Developer Support due to subscription level, your first battle will be to convince the Email & Desktop Integrations team that this is a known SF issue and needs to be handled by Dev Support anyway.  They will attempt to close the case and refer you to this forum.

Once it's at Dev Support, you'll need to get this escalated to Tier 3 Dev Support, this isn't so much a challenge as it is time-consuming.  Once it gets there, you should get it resolved.  I recommend getting on the phone with a supervisor as soon as you submit your case, explain the situation and appeal to their common sense to have a Tier 3 Support tech go straight to the fix instead of walking through all the normal troubleshooting steps at all Tiers, which will prove pointless.

Refer to this forum post (https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I4EzQAK) and include the following, or something similar, in your case description to supplement your other info:

Please review Case 15876990 which details the same problem I'm having, but with another customer.  SF Tier 3 Developer Support can easily fix this when they look for and remove any Apex Token jobs stuck in queue, caused by a SalesForce platform bug.  One SF tech that has fixed this is Varun Guruvugari, Success Agent - Tier 3.

This is NOT a developer issue.  It is a functionality/operational issue. I'm not asking for support to build anything.  The fix is only under your control. I understand why you restrict Developer Support to certain subscription levels.  However, when it's the platform that should run the job and isn't doing it, as is the case with this issue, that must be something that should be looked at for any customer that has the capability to run jobs, regardless of subscription level.

The job stopped being run and since we don't develop anything, the package being run hasn't changed (its managed).  This is something for Salesforce to fix.
 

All Answers

Norm CopelandNorm Copeland
Hi Sara, did you ever figure anything out for this? I've been seeing some odd behaviour this last week. I've been getting emails form the MC4SF plugin each night around 3am saying "Oops! It looks like the MailChimp API is unavailable for an unknown reason. Please check with MailChimp Support and try again later." Are you seeing this too? It also looks like almost all of our subscribers were removed from the groups we'd set up. I'm working with MC support right now on this. 
Sara LandisSara Landis
No, we have not figured anything out--MC4SF is still stuck in holding since the last time I tried to manually run the sync. I haven't seen any changes in the subscribers that are on my existing lists.
Leslie Cox 8Leslie Cox 8
Hi, Sara- Hi, Norm.  I found this post while trying to discover why my system spammed Admins with 20+ Mailchimp errors about the same error Norm is mentioning.  All were time-stamped around half-past midnight early this AM.  I am not a developer and I not sure but I think this means something was wrong and resolved itself (and stopped sending errors), based on what I see in my main MailChimp to Salesforce window.  But I thought I'd report the situation to you both as a similar instance of errors in a similar timeframe.

Sara, I don't have batch jobs like yours, I don't think - but the time stamp of the errors matches about 1/2 hour past when a couple of our MailChimp member queries were trying to sync to Salesforce?

Norm, our subscribers all seem okay, and the errors seems to have been generated during some kind of hiccup on the MailChimp side when the queries I mentioned to Sara just above tried to run.  They are actually set for midnight, however, so I'm a bit stumped that all the errors (and the later "success" are time-stamped 12:27AM instead.

Not sure if any of this is helpful... perhaps the two of you know more than I, or someone else does, and will be able to enlighten the lot of us.  :-)
hsidokhsidok
HI Norm,

Did you find the solutions for "Oops! It looks like the MailChimp API is unavailable for an unknown reason. Please check with MailChimp Support and try again later." 

Same issue facing myself also. Please provide your suggestion.

Thanks,
Norm CopelandNorm Copeland
Nothing yet - Still working with Mailchimp support on this.

@Leslie, sorry to not get back to you sooner. I don't yet have a solution to my issue. Mailchimp says that my two issues (people being removed from groups and the API error notification) are two sperate errors but I'm not convinced. If we add people back to groups, each night they are removed again around the same time that the API errors are generated. Will update when I have more info to share. 
Emily Offshack 7Emily Offshack 7
I'm also having this issue with admins receiving the MailChimp API unavailable emails around 3am on a few days (I'm on the east coast, so I assume that's the difference in time). I haven't seen a pattern to the days. We do not have it set to run queries to sync from Salesforce to MailChimp. We only have new leads from MailChimp going into Salesforce. 

Would love to hear the solution once it's been resolved! Thanks for posting this!
Jon ShippJon Shipp
I have two clients that are having this issue.  They are both on NA16.  I am putting a case into Salesforce.
Jelle TerpstraJelle Terpstra
NA11 here, also the same problem where users are receiving the "MailChimp API is Unavailable" email. 

Really annoying since the email is sent in my name, probably because I was the admin that configured the plugin. This morning 40+ of these emails were sent and received by a lot of the organizations Salesforce users...

Does anyone know how I can at least prevent this e-mail being sent to some of the users? Is there a setting somewhere where this can be configured? Not every user receiving these warning emails is an administrator.
Ben BBen B
Hi All, I'm having the exact same issue! It would be great to find a solution to avoid spamming all the admins on the account while the bug is being fixed, any thoughts?

I want to avoid deleting the entire app, which is tempting because the notification emails are so disruptive.
InjureFree SupportInjureFree Support
Hello Sara, I'm experiencing the same issue you described, have gone through the MC and SF Support steps, and recieved the same request for info from MC Support.  Just starting my search for answers.  Have you found a resolution to this issue?
InjureFree SupportInjureFree Support
Found another thread in this forum with the answer:  https://developer.salesforce.com/forums#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=9060G000000Xg4BQAS
Sara LandisSara Landis
Thanks. Our IT support team also made a second attempt and received the below reply about a summer release of bug fixes (although the known issue they link to is not the identical to ours.)

Connection User  02/20/2017 11:25:09 AM EST

Hi John,

Hope you doing great !

I investigated on this issue and was able to find that this is related to a known issue:

https://success.salesforce.com/issues_view?id=a1p3A0000008g2NQAQ

R&D team is presently working on this to get this bug fixed. This is expected to be resolved by summer'17 release.

You can just click on this issue "This issue affects me" and you would be notified about the updates on this issue.

Hence, I would go ahead and mark this case as "Bug Fix". You face any issues you can just a new case.

Thanks,
Ujjwal
 
Sara LandisSara Landis
And please update this thread if you are able to resolve your issue. Thanks!
InjureFree SupportInjureFree Support
The most relevant note from the forum I listed  (https://developer.salesforce.com/forums#!/feedtype=SINGLE_QUESTION_SEARCH_RESULT&id=9060G000000Xg4BQAS) is:
"Mark Yohai
I was able to get SalesForce support to look at it after explaining it's an operational issue on their end, not a developer issue...then they resolved it as follows: We have identified the Issue and have deleted few Orphaned "ApexToken" jobs which were stuck in the queue because of a platform bug.
December 2, 2016"

I'm going to submit a new case to SF with this info.  Will let you know how it goes.
 
Brandon HillBrandon Hill
@Did you get any updates to your case? I'm having a huge issue with Apex jobs staying stuck in Holding status. It works perfectly in the Salesforce sandbox. 
InjureFree SupportInjureFree Support
For those looking for the solution to Sara's issue (not the other issue introduced later in the thread), here's a way to get this fixed.  If you don't have Developer Support due to subscription level, your first battle will be to convince the Email & Desktop Integrations team that this is a known SF issue and needs to be handled by Dev Support anyway.  They will attempt to close the case and refer you to this forum.

Once it's at Dev Support, you'll need to get this escalated to Tier 3 Dev Support, this isn't so much a challenge as it is time-consuming.  Once it gets there, you should get it resolved.  I recommend getting on the phone with a supervisor as soon as you submit your case, explain the situation and appeal to their common sense to have a Tier 3 Support tech go straight to the fix instead of walking through all the normal troubleshooting steps at all Tiers, which will prove pointless.

Refer to this forum post (https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I4EzQAK) and include the following, or something similar, in your case description to supplement your other info:

Please review Case 15876990 which details the same problem I'm having, but with another customer.  SF Tier 3 Developer Support can easily fix this when they look for and remove any Apex Token jobs stuck in queue, caused by a SalesForce platform bug.  One SF tech that has fixed this is Varun Guruvugari, Success Agent - Tier 3.

This is NOT a developer issue.  It is a functionality/operational issue. I'm not asking for support to build anything.  The fix is only under your control. I understand why you restrict Developer Support to certain subscription levels.  However, when it's the platform that should run the job and isn't doing it, as is the case with this issue, that must be something that should be looked at for any customer that has the capability to run jobs, regardless of subscription level.

The job stopped being run and since we don't develop anything, the package being run hasn't changed (its managed).  This is something for Salesforce to fix.
 
This was selected as the best answer
Sara LandisSara Landis
Thank you, InjureFree Support--this worked for us as well. We were able to get Salesforce to address the issue and our lists have been syncing for a full 24 hours now without issue.
Deepika Chauhan 17Deepika Chauhan 17
Hi,
You can now easily integrate Salesforce and MailChimp together via MailChimp Salesforce Connector.
One which I would like to recommend is ChimpConnect (https://eshopsync.com/mailchimp/)
You can check out this to know more on how you can integrate MailChimp and Salesforce together.