逻辑应用程序:HTTP触发和响应超时

时间:2020-10-14 20:28:34

标签: azure-logic-apps

我有一个非常简单的LA,其中仅包含3个动作。它具有HTTP触发器,然后从SQL Server获取一些数据并返回带有SQL数据的http响应。

有时候,它需要30到50秒的时间才能从SQL中获取数据,但是Logic App在此过程中会同时向调用方显示超时错误。

模板动作“ Response_2”的执行失败:客户端应用程序超时,等待来自服务的响应。这意味着工作流花费的时间比分配的超时值长。客户端应用程序和服务之间维护的连接将关闭,客户端应用程序将获得HTTP状态代码504网关超时。

有什么主意如何增加允许的响应时间?

1 个答案:

答案 0 :(得分:2)

您可以在Asynchronous Response 操作的Settings中打开Response

enter image description here

enter image description here

当您运行逻辑应用程序的时间超过其时间限制时,您将首先接受202 HTTP Code

enter image description here

它将返回包含位置标头的响应:

enter image description here

您可以请求location URL,如果逻辑应用程序的状态仍然为running,它将返回202。

enter image description here

如果逻辑应用程序的状态为Succeeded,则它将返回您想要的结果。

enter image description here

您可以参考此official document