You need to sign in to do that
Don't have an account?
Solomon
Inconsistent Error between Environments
The issue we are encountering in that when making an HTTP Request, we immediately receive an System.CalloutException: Exceeded max size limit of 3000000. This issue is not occurring with the same code in the org's sandbox. In the sandbox, the call is successful and returns data as expected. But in the production instance, we constantly receive this error. I have checked the heap size prior to making the callout and it is 5406 bytes in size, well within the 3MB size limit. This is being reported in both the sandbox and in production. All other governor limits are well within limits. There are two HTTP requests that are made before the call that causes the error (to authenticate, etc.) so it is very confusing why this error is occurring, especially since it works just fine in the sandbox.
Please help.
Please help.
All Answers
Maximum size of callout request or response (HTTP request or Web services call) 3 MB
But we know for a fact that the actual request is 5406 bytes. We don't know what is causing the production org to think the request is bigger then 3 MB.
I believe this is the point that is causing the issue. I've seen the request that is supposed to be sent, it is nothing more then a URL. Kevin can that error be caused by the response to the request without ever registering that the request actully suceeded? I only ask becasue I know the 3 MB limit is both request and respone.
public HttpResponse send() {
generateEndpoint();
generateBody();
if( logDetails() ) {
System.debug( 'Generated Endpoint: ' + request.getEndpoint() );
System.debug( 'Generated Body: ' + request.getBody() );
System.debug( 'Body Length: ' + request.getBody().length());
System.debug ( 'Heap Size: ' + Limits.getHeapSize());
}
response = session.http.send( request );
if( logDetails() ) {
System.debug( 'Response Status: ' + response.getStatusCode() );
String body = response.getBody();
System.debug( 'Response Body: ' + body );
if( body.length() > 1000 ) {
body = body.left( 1000 );
}
System.debug( 'First 1000 chars of Response Body: ' + body );
}
return response;