apex Heap size error - only for some users

  • 1
  • Problem
  • Updated 2 years ago
  • Acknowledged
One of our users is getting a heap size error size of 687..... no one else is on the same page. I've tried everything I can think of to reduce the size, I'm thinking it might have something to do with this particular user somehow, does that make any sense? 
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
This is a very strange situation. I removed a couple fields from the User model and the heap size increased to 700000+, I reverted to the auto-save and the heap size went back down. 

Next I tried to deleting a tab that has a lot of sub tabs. Again, the heap size went up after I deleted it. 

Finally I just hacked and hewed until it worked. Had to really strip out models on the page - models that weren't even loading on page load, that only loaded when a certain tab was first shown.

I also had to get down below 610000 in order for it to not be too large. I'm a system admin and this user is not, is there a different heap size limit for different profiles? I though I remembered that it seems like if you got below 650000 it came back.
Photo of Owen Smith

Owen Smith

  • 194 Points 100 badge 2x thumb
Jack - I am having a similar issue. As an admin I am not receiving a heap error, but a handful of non admin users are receiving a heap error. I am trying to debug. Question for you - how did you monitor the heap size? are you using a de-bug log or some other method? Ideally, I'd like to "watch" the log as I perform page actions in order to see what might be causing the issue. Is this possible?
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
There are two resources worth first checking out:

http://help.skuid.com/m/supercharge-your-ui/l/391568-skuid-page-performance-guide
This one is great for showing how to "monitor" in the console.

I highly recommend googling "heap size skuid" to see other ways people have managed this relatively common problem. 
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Photo of Jack Sanford

Jack Sanford, Champion

  • 8,322 Points 5k badge 2x thumb
Both good links! Owen, one lesson I learned was that you don't even want to go near the heap size limit. So if any user ever gets it, you're too close to it, even if they don't get it consistently, and you'll want to find ways to reduce your heap size.