apigee

Returning Large Payload with apigee Proxy


We're migrating our services to apigee and we're running into an issue. We have a service that returns large payloads (>55MB) and when I pass it through a defined apigee proxy, it would return:

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

Is there an apigee policy and/or proxy setting I can use to avoid this?

And, no, streaming is not an option. We need to duplicate the behavior as we want the migration to apigee transparent to our clients.


Solution

  • You should try the TargetEndpoint property response.streaming.enabled . That property passes the response through to the caller untouched without loading the payload into the message buffer. It does not require you to use any kind of HTTP streaming. You will not be able to edit the payload in any way, but it should pass through fine.

    Loading a very large payload into memory in the message processor is forbidden because it could result in memory issues for Apigee Edge.