Connection Pooling Problem
-
I have an ASP.NET application accessing a SQL Server database. Worked fine last night, this morning I am getting the following error continuously:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.SqlClient.SqlConnection.Open() at MyService.DataService.AuthenticateUser(String DomainUsername) in \\Eoctstliciis01\CREQSERVICE\DataService.asmx.vb:line 169 --- End of inner exception stack trace ---
I have checked my code over and over again and I am closing/disposing of all connections as soon as I’ve finished with them. I’m the only person accessing the application at the moment, but I keep getting this error. I’ve checked Process Info / Current Activity in SQL enterprise manager, and there are a normal number of connections open. · How can I check or set the number of pooled connections I have available? · Is there a way of increasing the pool size? Any help would be much appreciated, as I'm currently in a state of panic! :eek: Thanks, John. www.silveronion.com[^] -
I have an ASP.NET application accessing a SQL Server database. Worked fine last night, this morning I am getting the following error continuously:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached. at System.Data.SqlClient.SqlConnection.Open() at MyService.DataService.AuthenticateUser(String DomainUsername) in \\Eoctstliciis01\CREQSERVICE\DataService.asmx.vb:line 169 --- End of inner exception stack trace ---
I have checked my code over and over again and I am closing/disposing of all connections as soon as I’ve finished with them. I’m the only person accessing the application at the moment, but I keep getting this error. I’ve checked Process Info / Current Activity in SQL enterprise manager, and there are a normal number of connections open. · How can I check or set the number of pooled connections I have available? · Is there a way of increasing the pool size? Any help would be much appreciated, as I'm currently in a state of panic! :eek: Thanks, John. www.silveronion.com[^]Following up on this problem, I think there was an issue with the server I was running this on. I moved the code to my local IIS server and it works fine. I discovered that PerfMon lets me view the number of connection pools being used. .NET CLR Data / SQLClient:Current # pooled connections. However – I did some testing by leaving connections open on purpose, the app falls over when it reaches 100 (as expected), but the pooled connection counter never seems to reset back to zero, even when I stop/start IIS. This may be related to the following: BUG: SqlClient Performance Counters Do Not Reset ID: Q314429 http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314429 I found this on a google search, but the KB Article no longer exists – So I don't know if Q314429 is still an issue Is there a more reliable way to monitor the number of pooled connections? Thanks, John. www.silveronion.com[^]