+ Start a Discussion
Vijay NagarathinamVijay Nagarathinam 

FATAL_ERROR|System.LimitException: Query of LOB fields caused heap usage to exceed limit.

Hi,

I am getting the below exception in my apex trigger. Can anyone suggest me how to resolve this issue?

FATAL_ERROR|System.LimitException: Query of LOB fields caused heap usage to exceed limit.

Thanks,
Vijay
FearNoneFearNone
Hi Vijay,

One of the many possible causes is your trigger pulls or contains too many data. You could remove some unwanted fields in your query.
Vijay NagarathinamVijay Nagarathinam
Okay, Thanks FearNone.!
gopi biswalgopi biswal
Your query is getting more data. Just check the limitation of Heap size 6MB. Link :  https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

Check for best practice that you can reduce it. May help you ... https://developer.salesforce.com/blogs/engineering/2013/02/force-com-soql-best-practices-nulls-and-formula-fields.html
PRABHAKARAN CHOCKALINGAMPRABHAKARAN CHOCKALINGAM
Would you try moving the logic to an Async call so that we can use a heap size of 12 MB.
Could you provide your code.