Hello,
I am currently trying to enable streaming on a API proxy that has a response size of about 13mb by following the instruction on this page https://docs.apigee.com/api-platform/develop/enabling-streaming
However, I am still receiving the Body buffer overflow message.
I have removed all policies that would be interacting with the response, so I would expect this solution to work.
Does anyone have any insight about what I could be missing?
Thank you
Hi @Dan Fischer, not sure if you have tried adding below properties to both Proxy and Target Endpoints; Adding these properties enables streaming.
<Properties> <Property name="response.streaming.enabled">true</Property> <Property name="request.streaming.enabled">true</Property> </Properties>
I have attached a sample proxy - http-streaming-sample-rev1-2019-03-15.zip, which demonstrates http streaming, I have tried sending over 15mb JSON payload, and it works fine. Look into the `<HTTPProxyConnection>` and `<HTTPTargetConnection>` properties, that enables streaming. I hope this helps.
I did add the properties to enable streaming for both the response and request as you described and as described on the page I linked originally.
However, when I test in Postman, I'm still seeing the same error message.
Are there any other properties or settings I should be aware of that could be causing my problems?
Thank you
@Dan Fischer, could you attach the proxy bundle here for review, if possible?
I've attached the proxy here.
I removed some of the information for security reasons.
Thank you for the help!
Hi @Dan Fischer, I see that you're using RouteRule to choose Target URLs. I tried creating similar setup with sample proxy that I attached previously, I suggest adding these properties to each of your proxy RouteRule -> HTTPTargetConnection as well; Here's complete default.xml for my proxy;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ProxyEndpoint name="default"> <Description/> <FaultRules/> <PreFlow name="PreFlow"> <Request/> <Response/> </PreFlow> <PostFlow name="PostFlow"> <Request/> <Response/> </PostFlow> <Flows/> <HTTPProxyConnection> <BasePath>/v1/http-streaming-sample</BasePath> <Properties> <Property name="response.streaming.enabled">true</Property> <Property name="request.streaming.enabled">true</Property> </Properties> <VirtualHost>default</VirtualHost> <VirtualHost>secure</VirtualHost> </HTTPProxyConnection> <RouteRule name="smoke"> <Condition>(environment.name = "test") and (request.header.smoke = "true")</Condition> <HTTPTargetConnection> <Properties> <Property name="response.streaming.enabled">true</Property> <Property name="request.streaming.enabled">true</Property> </Properties> <URL>http://mocktarget.apigee.net/echo</URL> </HTTPTargetConnection> </RouteRule> <RouteRule name="default"> <TargetEndpoint>default</TargetEndpoint> </RouteRule> </ProxyEndpoint>
Also find the attached sample proxy for full-setup - http-streaming-sample-rev3-2019-03-18.zip
Lastly, I would suggest using Target Servers -
https://docs.apigee.com/api-platform/deploy/load-balancing-across-backend-servers instead of using conditional route rule to set Target URL in your proxy.
Good luck!