c# - SQL 服务器 Microsoft.Data.SqlClient.SqlException (0x80131904) : Execution Timeout Expired on azure

标签 c# sql-server azure entity-framework-core timeout

我使用外部 SQL Server 来托管我们的数据库,ASP.NET MVC Core 应用程序托管在 Azure 上。在本地开发计算机上,当执行复杂查询时,Web 应用程序工作正常,但在 Azure 上我遇到异常

Microsoft.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired

我使用相同的数据库和连接字符串,而且我们不使用 Azure SQL,而是使用我们自己的远程托管 SQL Server。为什么复杂的查询在 Azure 上停止工作,我不知道在哪里寻找问题。

连接字符串:

data source=xx.xx.xx.xx;initial catalog=ca-xx;user id=ca-xx;password=xxxx;connection timeout=600

最佳答案

在使用 Azure Sql 数据库和 Azure Release 时,我遇到了同样的问题。我发现数据库性能是一个问题。当我升级数据库的 DTU 后,它就运行良好。

enter image description here

关于c# - SQL 服务器 Microsoft.Data.SqlClient.SqlException (0x80131904) : Execution Timeout Expired on azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60505215/

相关文章:

C# Linq Query Bad 转换为 RavanDB 中的 RQL

azure - 创建索引器,将数据源作为索引内 JSON 文档中的字段

.net - MSMQ 在 Azure 上可用

azure - Terraform azurerm_kubernetes_cluster 无效或未知 key : network_profile

python - pyodbc 和 sql server,将 datetime.date 应用于 DATE 列

asp.net - 新产品属性的实体属性值 (EAV) 与 XML 列

c# - 无法完全限定枚举,这是一个错误吗?

c# - 在依赖注入(inject)中使用用户变量

c# - 依赖注入(inject)中的 Blazor(服务器)作用域对象创建多个实例

sql-server - 无法通过批处理文件使用 SQLCMD 连接到 SQL Server