执行超时过期的SQL过程 [英] Execution Timeout Expired SQL Procedure

查看:105
本文介绍了执行超时过期的SQL过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我遇到了一个问题,我有一个逻辑应用程序,该逻辑应用程序在Azure SQL数据库中调用存储过程(sp),但由于要花费超过2分钟的时间才能完成,所以它超时.我知道在类似这样的话题中已经问过同样的问题 2:

I've been running into an issue where I have a logic app that calls a stored procedure (sp) in Azure SQL Database but it times out because it takes longer than 2mins to complete. I'm aware that the same question has already been asked in topics like these 2:

https://social.msdn.microsoft.com/Forums/azure/zh-CN/0ed4469f-88e4-4c01-8a19-48bdb4a467a7/gatewaytimeout-on-stored-procedure-calls?forum=azurelogicapps

https://social.msdn.microsoft.com/Forums/azure/en-US/0ed4469f-88e4-4c01-8a19-48bdb4a467a7/gatewaytimeout-on-stored-procedure-calls?forum=azurelogicapps

https://social.msdn.microsoft.com/Forums/azure/zh-CN/e3ac77af-dfbb-4eb9-9041-02c6fd50eac0/gateway-timeout-when-calling-sql-stored-procedure?forum=azurelogicapps

https://social.msdn.microsoft.com/Forums/azure/en-US/e3ac77af-dfbb-4eb9-9041-02c6fd50eac0/gateway-timeout-when-calling-sql-stored-procedure?forum=azurelogicapps

但是,对这些主题的答复对我没有帮助.分页并不是真正的选择,因为没有数据被返回,这是一个简单的sp,它在数据库中进行多个计算,并且仅在这些计算完成时才返回.为了同样的原因, 恐怕在这种情况下,执行直到循环"也无济于事.我知道可以建立自定义的连接器(不确定如何),但是在这种情况下不知道是否对我有帮助.

However, the replies on those topics don't help me. Pagination isn't really an option since no data is being returned, this is simpy a sp that makes several calculations in the database and returns only when those calculations finish. For the same reason, a do until loop won't help me either in this case I'm afraid. I know custom connectors can be built (not sure how though) but don't know if that would help me in this case.

是否可以采取任何措施来延长等待SP完成的时间?这里可以遵循什么方法.

Is there anything that can be done to extend the time I wait for the completion of the sp? What approaches can be followed here.

谢谢

推荐答案

我相信超时是在内部在连接器级别设置的.

I believe the timeout is set at the connector level internally.

可能的解决方法之一是拥有自己的调用存储过程的函数.

One way you can probably workaround this is to have you own function which calls the stored procedure.

此处  ;是一个文档,解释了如何从Azure Functions连接到SQL数据库.您可能需要设置更高的值 到

Here is a doc which explains how you can connect to a SQL Database from Azure Functions. You might have to set a higher value to the SqlCommand.CommandTimeout.

也如上所述,持久功能 专为此类情况设计的.

Also, as mentioned here, if your function doesn't complete in 2.5 minutes, it will timeout as well. To workaround this, you will want to look at Durable Functions which were designed for such scenarios.


这篇关于执行超时过期的SQL过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆