Error while requesting/returning large payload with Apigee proxy

4 3 9,666

You might come across the following error if you are trying to request/return a large payload via Apigee proxy.

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

Loading a very large payload into memory in the message processor is forbidden because it could result in memory issues for Apigee Edge. The default limit is 3mb for Apigee Edge OPDK and 10mb for Apigee Edge cloud.

As a workaround, please consider enabling streaming . If you continue to see the same error even after enabling streaming, please ensure to remove any policies that require access to the request or response payload.

Apigee Edge OPDK customers can edit the "HTTPResponse.body.buffer.limit" parameter in the http.properties file on the message processor to increase the limit. It is recommended that any such change is tested before it is put in production.

Comments
Not applicable

Hello @Arun Kumar.

I have some questions regarding this topic. According to Apigee Docs: http://apigee.com/docs/api-services/reference/endpoint-properties-reference

'response.streaming.enabled' property When true, HTTP response payloads are not read into buffer. The response payload streams as-is to the client. The response payload will not be available for policy enforcement.

I tested with api proxy sample 'streaming' on

https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/streaming

and found that a 'XML to JSON' policy added on target response flow just works with it.

Then what are the restrictions on the 'policy enforcement' above? Also with the streaming property enabled Trace data on Management UI doesn't show the payload body contents.

Is this just by design? Thanks, Toshi

Not applicable

@Toshihiro Shibamoto

sorry i came across your question only recently. The behavior you noticed has been discussed on another thread: https://community.apigee.com/questions/10141/how-does-http-streaming-on-edge-really-work.html#answe...

adas
Participant V

@Toshihiro Shibamoto When streaming is enabled, trace would not show the request/response content because the request/response is not buffered and is not available to debug sessions. Ideally, there's no restriction on policy enforcement for a streaming enabled endpoints. If there are policies which need to operate on the payload, those should ideally get skipped when streaming is enabled. However, there's a bug in the system because of which this doesn't work expected. I have referred to the same in the other post.

Version history
Last update:
‎02-12-2015 05:29 PM
Updated by: