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
kumar.fdc81.3902978579608325E12kumar.fdc81.3902978579608325E12 

ERROR System.LimitException: Apex heap size too large: 13877540

Hi all,

I am getting this error when i executing the Batch

ERROR System.LimitException: Apex heap size too large: 13877540

give me any suggestions.

Thanks
NagaNaga (Salesforce Developers) 
Hi Kumar,

Can you break them into smaller batch file and then try to exceute?
There's a lot of useful information around heap management in this post from Jeff Douglas:

 http://blog.jeffdouglas.com/2010/08/16/managing-the-heap-in-salesforce-com/

Best Regards
Naga Kiran
Amit Chaudhary 8Amit Chaudhary 8
Please add some limit in your batch job query. That will resolve your issu
kumar.fdc81.3902978579608325E12kumar.fdc81.3902978579608325E12
@Naga,

How i divide into saller batches... Can you give me sample code.

Thanks