Has anyone run into this? JSON string exceeds heap size limit An unexpected error has occurred. You

The page works for some users but not for others.  They get this error showing up (sometimes and other times it works).  It’s a Tab override page focused on opportunities and products.

Very confused on how to fix.  

Hi Joe, I’ve had similar errors when the page is trying to pull in too many records (ie thousands) from the server. Are you able to limit the number of rows/records in the model using its Advanced properties?

this might depend on how many records your users need to work with, but they can always use the ‘load more’ button to bring in more records if required.

Joe - you should probably read this post: https://community.skuid.com/t/models-how-many-is-too-many

It has some good information about the “Heap Size” error and how to avoid it. 

We ran into the same issue on this today.  What confused me was that we were only getting the error on some of the records for the same custom object.  

Our primary model was for a custom object “Property Listing”.  The page loaded that model as well as a few others (attachments, photos and activities).  


Apparently the “Attachment” model was the culprit.  We had it set to load 20 records when the page loaded and when I reduced it down to 1 the error went away.  I haven’t messed with it to see at what amount of records the error will show up again as we only need to load a single attachment record.  

What I learned from the team was that the Body field, when pulled through, is the coding of the attachment.  Leave that off when pulling through attachments and it works.

Yup.  Never bring in the body of an attachment.  Its no good in Skuid and it can contain a TON of data. 

i’ve followed the advice from above and on the ‘Attachment’ model have set Max # of records (Limit)  1 record  - yet im still getting the JSON string exceeds heap size limit Error message - effectively locking up the record. 

To give some context, my client is a financial institution that need to upload a lot of documents, some bigger than some. could be 10Mb-20mb in size. 
Any advice on what else i can do to stop that message from coming up? 

What fields are you pulling through with that model?  Make sure you do not include the “Body” field.