How to overcome Body buffer overflow in Service Call out policy

I am facing below error in service callout policy

{

"fault":{ "faultstring":"Execution of ServiceCallout SC-Call-To-OnDemand-Report failed.

Reason:Body buffer overflow",

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

}

}

My service Callout Policy is

<ServiceCallout async="false" continueOnError="false" enabled="true" name="serviceCallToemply">

<DisplayName>serviceCallToemply</DisplayName>

<Request variable="request" clearPayload="true">

<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>

<Set> <Verb>POST</Verb>

<Headers>

<Header name="Content-Type">application/json</Header>

</Headers> <Path>xxxxx/serviceCallToemply</Path>

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

</Set> </Request>

<Response>response</Response>

<Timeout>300000</Timeout>

<HTTPTargetConnection>

<LoadBalancer>

<Server name="xxxxxxxxx"/>

</LoadBalancer>

</HTTPTargetConnection>

</ServiceCallout>

and the content is around 100Mb i tried with but it will not work

<Properties>

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

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

</Properties>

Suggest the best way to avoid Body buffer overflow

0 2 839
2 REPLIES 2

As you might be knowing the message payload size is restricted to,

  • 10MB in Edge Cloud
  • 10MB in Edge for Private Cloud

You can modify this value in Edge for Private Cloud deployments. Be sure to test before deploying the change to production.

With streaming enabled, Apigee strongly recommends you do not attach policies that require access to the request or response payload. Those types of policies will either cause errors or trigger buffering in the API proxy, which limits payload size to the numbers listed above and defeats the purpose of enabling streaming to handle large payloads. You can attach policies that do not interact with the request/response body, such as authentication or message logging policies.

100MB is quite a big file for Apigee.

Where is this Service Callout? and where did you add these Streaming properties?

Proxy/TargetEndpoint?

I guess we cannot use this payload in any policy, but it should pass through fine.

Streaming is generally used for passing through huge payloads to backends/targets without using it in any policies.

Do you have an ESB in your infrastructure?

How to add streaming properties in edge could and try to add properties in targetConnections in service callout policy but it won't work.can u suggest the best way to achieve through service callout policy.