Why is the McMemberBatch hourly sync failing with an Apex heap size too large error?
The hourly sync runs a background batch job called McMemberBatch, which updates and inserts your Mailchimp member records in Salesforce. When this job hits Salesforce's memory limit, it logs an Apex heap size error. No data is lost — the sync will recover on the next hourly run — but if the error is happening consistently, there are a few things to check.
The Solution
You can adjust how many records we process per execution. Fewer records means less memory used — the sync will run a little slower but for most users this won't be noticeable. Set the value to half your current setting to start.
- Go to the Mailchimp Settings tab.
- Select Maintenance from the menu.
- Click on Settings from the dropdown next to Reports.
- Locate the 'Members to sync per execution' setting.
- Reduce the value to half its current amount and save.
If the error persists, reduce it further. If you reach 1 and are still seeing errors, you should probably check other custom code, flows, or processes that are running outside of our product.

