+ Start a Discussion
SandrineSandrine 

error System.LimitException: Apex heap size too large: 6046577

Hello,

i am executing a code in anonymouse log
I have a error like below
System.LimitException: Apex heap size too large: 6046577

i am executing a SOQL query,
What alternative code i can i use,
thank you
Best Answer chosen by Sandrine
Uttpal_ChandraUttpal_Chandra
Hi Sandrine,

Go through the given links as it may help you in solving your problem.

--> https://blog.jeffdouglas.com/2010/08/16/managing-the-heap-in-salesforce-com/ 
-->  https://help.salesforce.com/articleView?id=000321537&type=1&mode=1 (https://help.salesforce.com/articleView?id=000321537&type=1&mode=1)