Getting Buffer overflow for API proxy

59 views Asked by At

When accessing apigee proxy, I am getting buffer overflow error.

{
    "fault": {
        "faultstring": "Body buffer overflow",
        "detail": {
            "errorcode": "protocol.http.TooBigBody"
        }
    }
}

I tried to add this property on target endpoint:

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

But still getting same error.

2

There are 2 answers

0
cfhayes On

Apigee often has policies in place to manage request and response sizes. There could be a policy configured to limit the size of the message you're trying to send. Check your Apigee API proxy configuration, specifically the policies applied to the request, and see if there's a size limit policy in place.

0
jarus On

By default, Apigee sets a limitation on the message size to 10 MB. If this size is exceeded, it results in a protocol.http.TooBigBody error. You can refer here. Streaming can be used as an alternative to deal with this issue.

I noticed that you added the property only to the target endpoint. To enable response streaming, you need to add the following property under the properties tag for both the ProxyEndpoint and TargetEndpoint in your proxy:

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

Similarly, for request streaming, you should use the following property:

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