我有一个非常简单的 LA,它只包含 3 个 Action 。它有 HTTP 触发器,然后从 SQL 服务器获取一些数据并返回带有 SQL 数据的 http 响应。
有时,从 SQL 获取数据需要 30-50 秒,但同时 Logic App 会向调用方响应超时错误。
The execution of template action 'Response_2' is failed: the client application timed out waiting for a response from service. This means that workflow took longer to respond than the alloted timeout value. The connection maintained between the client application and service will be closed and client application will get an HTTP status code 504 Gateway Timeout.
知道如何增加允许的响应时间吗?
最佳答案
您可以在Response
操作的Settings
中开启Asynchronous Response
:
当您运行逻辑应用的时间超过其时间限制时,您将首先接受 202 HTTP 代码
:
它将返回一个包含位置 header 的响应:
您可以请求location
URL,如果您的逻辑应用程序的状态仍然是running
,它将返回202。
如果您的逻辑应用的状态是成功
,那么它将返回您想要的结果。
可以引用这个official document .
关于azure-logic-apps - 逻辑应用 : HTTP trigger and response time out,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64361045/