Body buffer overflow error in Service Call out policy

I have enabled Streaming in Service-Callout policy but still i am facing the Issue

{

"fault":{ "faultstring":"Execution of ServiceCallout SC-Call-To-OnDemand-Report failed. Reason: Body buffer overflow",

"detail":{"errorcode":"steps.servicecallout.ExecutionFailed"}

}

}

Servcie Callout Policy:

<ServiceCallout async="false" continueOnError="false" enabled="true" name="GetDetails"> <DisplayName>GetDetails</DisplayName>

<Request variable="request" clearPayload="true"> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>

<Set> <Verb>POST</Verb>

<Path>xxxxxx/getDetails</Path>

<Payload contentType="application/json">{payload}</Payload>

</Set> </Request>

<Response>response</Response>

<Timeout>800000</Timeout>

<HTTPTargetConnection>

<Properties>

<Property name="allow.http10">true</Property>

<Property name="response.streaming.enabled">true</Property>

</Properties> <LoadBalancer>

<Server name="xcxcxcxcxcxc"/>

</LoadBalancer>

</HTTPTargetConnection>

</ServiceCallout>

1.If any thing wrong in service callout policy,please correct it.

2.Maximum response payload varies from 50MB to 180MB , so what was the maximum payload allows by apigee oncloud premises.

3.So how to enable streaming in service callout policy.

1 6 755
6 REPLIES 6

I think the limit is 10MB.

Search these forums for the answer.

The reason you're getting an overflow is that you're over the limit. Don't do that.

Thank's for Response,but by enabling streaming it should allow more than 10MB data, what was the maximum limit in apigee can able to allow in Response and Request.

Hi @Dino-at-Google,

Appreciate the notion of keeping payloads small - but that is not always possible / feasible.

We faced this issue previously with the "TooBigBody" error being returned - and had a solution put in place that seems to have now been undone.


The error we now see returned is "Body Buffer Overflow"

We use an on premise setup and the solution for us was to use

response.streaming.enabled = true in our ServiceCallOut policy

to get the payload out.

This was working when we were on 4.18.*** but with a recent upgrade to 4.19.01.00 seems to have undone this.


I did do tests with ridiculously large file sizes and it worked in our test environment - and it naturally took a while to download but with response.streaming - it did download - it did work.

The issue we are seeing in Production now is for files around the ~12/13 MB mark - so not as large as my previous tests - and yet they fail which isnt making sense to me.

Appreciate any direction you can provide here.

Thanks,

P.S. - seeing this in the docs now at https://docs.apigee.com/api-platform/develop/enabling-streaming

"Message payload size is restricted to 10 MB in Edge Cloud and Private Cloud, even with streaming enabled. In non-streamed requests and responses, exceeding that size results in a protocol.http.TooBigBody error.
. . . For payloads larger than 10 MB, Apigee recommends using a signed URLs pattern within an Apigee JavaCallout, illustrated by the Edge Callout: Signed URL Generator example on GitHub. "


- feel like I am going out of my mind - 'cause I can swear that wasn't there before - is this recent?

I see a lot of forums posts suggesting turning on response.streaming as a solution to the problem as well - so get the general feeling that this was perhaps a way to get around the limit - but is no longer the case...

Hi @Dino-at-Google,

Where can we see incoming payload size on APIGEE platforms ? Are there any logs we have stored to see the payload on EDGE ?

Thank you

Pritam

We are using Service callout to call another proxy(say B) . The response expected from Proxy B is more than 10 MB

When I call proxy B independently I get data, but when I call it using Service Call out from Proxy A I get the error as below. 

MY SC policy code

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout continueOnError="false" enabled="true" name="Service-Callout-1">
<DisplayName>Service Callout-1</DisplayName>
<Properties/>
<Request>
<Set>
<Verb>GET</Verb>
<Path>/v1/activeemp</Path>
</Set>
</Request>
<Response>calloutResponse</Response>
<LocalTargetConnection>
<Properties>
<Property name="response.streaming.enabled">true</Property>
<Property name="request.streaming.enabled">true</Property>
<Property name="io.timeout.millis">1800000</Property>
</Properties>
<APIProxy>MMCWD_ActiveEE</APIProxy>
<ProxyEndpoint>default</ProxyEndpoint>
</LocalTargetConnection>
</ServiceCallout>

 

 

{
    "fault": {
        "faultstring""Execution of ServiceCallout Service-Callout-1 failed. Reason: Body buffer overflow",
        "detail": {
            "errorcode""steps.servicecallout.ExecutionFailed"
        }
    }
}

 

Listen to what  experts say on doing a different way to handle it but just for simple test try updating below options and restart RMP.

https://docs.apigee.com/private-cloud/v4.17.01/set-message-size-limit-router-or-message-processor

https://docs.apigee.com/api-platform/develop/enabling-streaming

eg:

conf_http_HTTPResponse.body.buffer.limit=15m
conf_http_HTTPRequest.body.buffer.limit=15m

 

Thanks.