You need to sign in to do that
Don't have an account?
![Kiru535 Kiru535](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Heap Size error
Hello Experts,
I need urgent help on Heap size error issue.
I have done following fixes which is working perfectly in fullcopy Sandbox but in production still we are getting this issue.
-->Cleared all list variables
-->Declared Trasient keyword for unwanted variables
-->removed unwanted fields from SOQL select query.
Please advice what else needs to be done to overcome this issue in production.
Regards,
KK.
I need urgent help on Heap size error issue.
I have done following fixes which is working perfectly in fullcopy Sandbox but in production still we are getting this issue.
-->Cleared all list variables
-->Declared Trasient keyword for unwanted variables
-->removed unwanted fields from SOQL select query.
Please advice what else needs to be done to overcome this issue in production.
Regards,
KK.
Please see if these suggestions help: http://blog.jeffdouglas.com/2010/08/16/managing-the-heap-in-salesforce-com/
As you are already following some of the best practices, and getting error on production then sometimes it's because of the data. Just for testing try reducing the results in your query by putting the limit and check if it works on production or not (as what I predict is you are getting data in bulk on production and same data is not on sandbox)
Add a bunch of these to your code and see where things are getting expensive: