Query of LOB fields caused heap usage to exceed limit.

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have no idea what this error means.


Can anyone explain me what this means? How to solve this error?
Photo of Avinash

Avinash

  • 1,726 Points 1k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
Can you check your model set ups on your page - do you have conditions to limit the query?  Number of records being pulled limited (not blank?)  You can search this community on heap size errors and find lots of other tips.
Photo of Avinash

Avinash

  • 1,726 Points 1k badge 2x thumb
Thank you very much. I adjusted few fields and removed unwanted fields from the model. this itself solved the error
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,050 Points 10k badge 2x thumb
Chandra is right in mentioning that there are a good number of discussions on the Community here regarding heap size errors.

This heap size error generally means that your Skuid page was trying to pull too much data. Salesforce currently limits this to around 6 MB. This limit can be reached if you're trying to pull too many fields into your model, or too many records, or both. The rule of thumb is to only pull the fields and records your users will need. Long text fields can sometimes drive up the size of the query quite a bit too. If you're able to set a condition on your model, like Chandra suggests, to only pull "active" records" for example, that can help a great deal.

Here is an in-depth guide that will help with page performance. You'll see in that guide that other things like filters and searches can cause this kind of issue too, if they're especially resource-intensive.

There's also a scenario related to file attachments that can cause this error to appear, which was just discussed on this Community post. You can see my response towards the bottom.