apex Heap size error - only for some users

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? 

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.

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?

There are two resources worth first checking out:

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. 

The second resource is from salesforce:


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.