Deduplicate Job - Heap Size Error

Last published at: March 5th, 2026

Problem:

When running a merge job or other large job, I get an error message stating “Apex heap size too large”.

Answer:

There can be several causes for this. Please try the following possible solutions:

  1. Clean up old jobs
    The most common cause is old jobs consuming excessive storage. Have a look at your jobs on the Deduplicate Job page; Deduplicate jobs, Set For Merge jobs, etc. Merge records in these jobs or delete the jobs entirely. 
    Read more in Deleting Jobs.
  2. Process jobs via Plauti Cloud, Desktop or Server
    Process large jobs via Plauti's dedicated job processing apps. These apps use processing power locally or in the Cloud instead of within Salesforce, and can therefore handle larger data volumes better. Processing speed will be increased as well.
    Read more about the different apps in Introduction to the Plauti Apps.
    Read more about running a job on Plauti Desktop or Server in Running a Job on Plauti Desktop or Server.
    Read more about running a job on Plauti Cloud in Run a Deduplicate Job on Plauti Cloud.
  3. Allocate more memory to Plauti Desktop or Server
    If you are already using Plauti Desktop or Server, try increasing the memory usage allocated to the app; up to 16GB for very large jobs.
    Read more in Deduplicate Settings for Desktop or Deduplicate Settings for Server.
  4. Split large jobs
    If running jobs on Plauti Cloud, Desktop or Server is not an option, try breaking up large jobs into smaller batches. Add filters to run a job on specific records.
    Read more in Deduplicate Job Filters.
  5. Disable Salesforce Debug Mode
    Using Salesforce Debug Mode can cause memory issues when running jobs. 
  6. Optimize the merge process
    Optimizing merge rules and other field configurations can help reducing memory consumption. Update the Object Configuration settings to exclude certain fields or related objects (for custom objects only) from the merge process. For optimizing scenarios used in jobs you can ask the AI Scenario Builder for tailored advice.
  7. Reduce storage space
    See if you can reduce storage space in other ways. 
    Read more in How to reduce storage space taken by Plauti Deduplicate.
  8. Fine-tune your data model
    Addressing underlying data model issues such as excessive lookup relationships or complex automations can improve performance overall, in your Deduplication jobs as well as in other Salesforce processes.
  9. Use a different browser
    Sometimes browser-related memory issues can contribute to the problem.