You need to sign in to do that
Don't have an account?

System.CalloutException: Exceeded max size limit of 6000000
Hello,
I am making a callout to an external API and am getting limit exception as the response seesm to be greater than 6 MB limit.
I already knew the Governor Limits but due to certain constraints we couldn't chunk out the response from database side.
Now SFDC needs to process the reponse correctly.
Does any one have an idea how can I divide the response into groups so as to be able to process them correctly, without getting limit exception??
The callout is being made via Batch Job.
Since I am still writing the batch job, I tested the response with Anonymous Block and the exception occurred.
Will the batch job be able to divide and handle the response ??
Any help is appreciated.
Thanks!
I am making a callout to an external API and am getting limit exception as the response seesm to be greater than 6 MB limit.
I already knew the Governor Limits but due to certain constraints we couldn't chunk out the response from database side.
Now SFDC needs to process the reponse correctly.
Does any one have an idea how can I divide the response into groups so as to be able to process them correctly, without getting limit exception??
The callout is being made via Batch Job.
Since I am still writing the batch job, I tested the response with Anonymous Block and the exception occurred.
Will the batch job be able to divide and handle the response ??
Any help is appreciated.
Thanks!
- This error message is due to a maximum size of call out response which is 6MB.This error is typical because of the following issue
a) (Maximum size of callout request or response)b) maximum allowed heap size (6MB sync / 12MB async).
- You may also try to set up the debug logs and check for the Apex heap size error to confirm.
- I would like to mentioned that the limit for both max sizes of call out (request and response ) and heap size is 6MB.
- Best practices for running within the Apex heap size
- https://help.salesforce.com/apex/HTViewSolution?urlname=Apex-Heap-Size-Best-Practices&language=en_US (https://help.salesforce.com/apex/HTViewSolution?urlname=Apex-Heap-Size-Best-Practices&language=en_US )
- https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-avoid-the-Apex-heap-limit-error&language=en_US (https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-avoid-the-Apex-heap-limit-error&language=en_US )
I hope it will be helpful.Please mark it as best answer if the information is informative.
BestRegards
RahulKumar
(https://help.salesforce.com/apex/HTViewSolution?urlname=How-to-avoid-the-Apex-heap-limit-error&language=en_US )