Fault Handling for HTTP 503 with Streaming enabled

I have an api proxy with both request and response streaming enabled (both on proxy endpoint and on the target endpoint). The target flow seems to be getting into an error state when we stream content greater than 20 MB in size with a HTTP 503 error.

error.cause in the trace shows ASYNC_EXCEPTION: Connection reset by peer

Is there a way to add fault handling for this scenario.

I have tried the approach given by @Sudheendras in this post https://community.apigee.com/questions/7049/fault-handling-for-response-503.html

This works perfectly fine when streaming is not enabled. once streaming is enabled, the fault rule does not get executed.

Anyone has any suggestions on what needs to be done to get the faultrule triggered when streaming is enabled?

Adding the trace session captured and the api proxy bundle as well.trace-1600899301031.zip 779-sample-weather-updated-sudheendra-rev1-2020-09.zip

0 2 184
2 REPLIES 2

Not applicable

When streaming is enabled operations on the payload won't work.

You may increase the payload in configuration of rmp. I would suggest to do pagination for 20mb data.

Perhaps, you did not check the trace session or the api proxy sample code that I shared. There are absolutely no policies or operations that work on the payload

I am not trying to resolve the HTTP 503 issue. The issue I am referring to in my post is to be able to trigger the fault rule for http 503 errors in the target endpoint, when streaming is enabled