Apex heap size too large debug

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I am getting the following error "Apex heap size too large: 16382976" when user has added an attachment. Does anyone knows how I can find out exactly what is causing the error?
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Bhavesh Shahu

Bhavesh Shahu

  • 120 Points 100 badge 2x thumb
You are trying to load more records.Reduce size in the model.See this post.
https://community.skuidify.com/skuid/topics/skuid_error_apex_heap_size_too_large_9436523
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
When the page loads there are no errors. It only happens after adding an attachment. The file is being added followed by error message. 

Please see attached image, This only happens after attaching a file using Upload button
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I think you are including the "Body" field in your attachment model.  With Attachments that can be several MG in size,  your model will blow up!  You can't use the body field anyway - so get rid of it...
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Thank you Bhavesh Rob,  I do not have body field in Attachment, when I refresh the page there is no error and all the attachments are listed. The error only appears when a new attachment is uploaded. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Two quick questions, what version of Skuid are you using, and what is the file size of the file that's being uploaded?
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Hi Ben, 

Skuid Version: 7:16 file size 13 bytes. I hope this helps. Thanks
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Very strange I'd have to take a deeper look. Are you able to grant login access to Skuid using these instructions?
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Hi Ben, I have granted Skuid login access. Do you know where I should send steps to recreate the error message? Please let me know. Thanks