【问题标题】:ASP.NET Webservice Query MSSQL Timeout (Poolgrösse/Poolsize)ASP.NET Web 服务查询 MSSQL 超时(Poolgrösse/Poolsize)
【发布时间】:2020-11-20 05:15:29
【问题描述】:

我创建了一个新的 Web 服务,我想在其中获取一些 SQL 查询。它工作了一段时间,但有时我收到以下错误:

System.InvalidOperationException: Timeout abgelaufen. Das Zeitlimit ist vor dem Anfordern einer 
Verbindung aus dem Pool abgelaufen. Möglicherweise werden alle Verbindungen im Pool bereits 
verwendet, und die maximale Poolgröße wurde erreicht.
bei System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, 
TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, 
DbConnectionInternal& connection)
bei System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection 
outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, 
DbConnectionOptions 
userOptions)
bei System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
bei System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
bei System.Data.SqlClient.SqlConnection.Open()
bei SailTrainer.GetSchueler(String un) in C:\inetpub\wwwroot\alert\App_Code\SailTrainer.vb:Zeile 81.

一段时间后它又可以工作了。

你们有什么想法吗?

编辑

我在函数开始时尝试了 con.Close(),它在打开新连接之前关闭已经打开的连接,但这似乎不起作用。

每次我保存我的 .asmx 文件时,它都会再次正常处理几个查询。

【问题讨论】:

    标签: asp.net web-services timeout


    【解决方案1】:

    这里是另一种说法:

    On Social MDSN Microsoft

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-05
      • 2023-03-12
      • 2012-03-12
      • 1970-01-01
      • 2011-04-24
      • 2014-02-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多