0

In ASP.NET web applicaiton, it gives below excpetion some times when large number of users are accessing site.

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.

Can you please guide me how i could trouble shoot and put resolution condition ?

In connection string adde d- "Max Pool" size as 500.

Hosted site on IIS 7 - server 2008

This issue come on productin server.

Thank You

user3711357
  • 1,425
  • 7
  • 32
  • 54
  • Search for a static connection in the web-application then remove static. Always close the connection as soon as possible f.e. with `using`. http://stackoverflow.com/questions/9705637/executereader-requires-an-open-and-available-connection-the-connections-curren/9707060#9707060 – Tim Schmelter Jul 25 '14 at 07:46
  • hmm... using sqlhelper so, it manages open close connction... – user3711357 Jul 25 '14 at 09:01
  • It's difficult to help without code. Maybe you have a loop which opens a connection or calls a method which opens it. – Tim Schmelter Jul 25 '14 at 09:08
  • Even though, i receive this error, error was logged into database.. so, i have doubt - if connection pool is reached at max level though how it could log the exception into database. – user3711357 Jul 25 '14 at 09:13
  • How do you log at all? However, these are related questions, maybe they will help you to find the reason: http://stackoverflow.com/questions/670774/how-can-i-solve-a-connection-pool-problem-between-asp-net-and-sql-server and http://stackoverflow.com/questions/15848239/how-to-solve-max-connection-pool-error – Tim Schmelter Jul 25 '14 at 09:19
  • I just log using - sql clien. No any logger mechanism used (log4net or any). hmm What are the settings to do on IIS or web.config about increase the Application pool size ? – user3711357 Jul 25 '14 at 11:25
  • I don't know what _"I just log using - sql clien"_ means. However, if it's not the application that logs but the sql-server than ... why should the database not log the error? Only your application's max-pool-size was exceeded. I would not increase it, instead search the reason. However, if you want to increase it anyway you do so in the connection-string. – Tim Schmelter Jul 25 '14 at 11:29
  • Microsoft SQL HELPER contains static methods for executequery,dataset retrival and other accees methods.. but In code, it initialize new sql connection object and new sql command object.Though, i have doubt `static` method scope may impact in web application. do you think? – user3711357 Jul 25 '14 at 12:47

0 Answers0