I created a new webservice where I want to get some SQL queries. It worked for a while but sometimes I get the following error:
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.
after a while it just work again.
Any of you an idea?
Edit
I tried con.Close() at the start of the function that it closes already open connection before opening a new one but that doesn't seem to work.
and every time I save my .asmx file it works fine again for a few queries.
Here is another disgussion: