Issue on Asynch response pattern when change Async response to Synchronous response in API out bound policy
Hi Everyone,
I am facing issue when run long running logic app.
I have approached Async pattern to change as synchronous policy and applied outbound policy like as below
<policies>
<inbound>
<base />
</inbound>
<backend>
<forward-request />
</backend>
<outbound>
<base />
<retry condition="@(((IResponse)context.Variables["var"]).StatusCode == 202)" count="10" interval="30">
<send-request mode="new" response-variable-name="var" ignore-error="false">
<set-url>@(context.Response.Headers["location"][0])</set-url>
<set-method>GET</set-method>
</send-request>
</retry>
<return-response response-variable-name="var" />
</outbound>
<on-error>
<base />
</on-error>
</policies>
it is working fine when logic app completes in short time as within 2 mins. and return 200 ok. PFA reference
But when same logic app runs more than 2 mins it showing error like 502- bad gateway .PFA for your reference.
I am not sure why it is showing.
could you please help me on this to understand more or how do i resolve this issue?
Thanks in advance