Issue on Asynch response pattern when change Async response to Synchronous response in API out bound policy

Revathi Subramaniam 21 Reputation points
2020-11-07T06:18:25.383+00:00

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
38162-capture.png

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 i38008-capture1.png resolve this issue?

Thanks in advance

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,909 questions
Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,965 questions
{count} votes