@AmitJaiswal-8743 With your info above, it is pretty clear that it was failing when processing the response in the outbound policy.
To answer your questions,
You would like to know the memory limitations for Azure APIM specifically developer tier.
- There is no limit (except consumption tier) as long as you do not buffer it at the APIM side (which means you can download very large files). But when you buffer or read entire response body through policy expressions like "System.Text.Encoding.UTF8.GetBytes(context.Request.Body.As<string>(preserveContent: true));", then there are limitations based on physical characteristics of VM (specific tier). But it's hard to have an exact number as it will depend on number of requests in flight at the same time and lot of other factors. I will pass the feedback to our product team to update the docs accordingly.
For the second, unfortunately APIM wasn't built for such scenarios and this needs to be handled outside of APIM.
You can also submit a feature request or feedback to our product team via aka.ms/apimwish. Feel free to add if you have any questions.