title: SQL Server Database Connection Pooling?
body: <p>I am getting the following exception in the website which has to a large extent deal with data entry operations. It also has Indexes defined on the tables in the associated database. The database calls are made via <code>SQLHelper</code>. For e.g. <code>SQLHelper.ExecuteNonQuery()</code> etc. I cannot see anywhere that the <code>Close()</code> or <code>Dispose()</code> method of the <code>SQLConnection</code> is invoked. So I am assuming that <code>SQLHelper</code> must be taking care of it as I have also read about it on various sites. Also, to check the code in combination with <code>Close()</code> or <code>Dispose()</code> is also very tedious as <code>SQLHelper</code> is used in many places and there are many classes where business logic is defined. The exception that I am getting is:</p>
  
  <blockquote>
    <p>The record was not updated 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.</p>
  </blockquote>
  
  <p>For now I have tested the code with putting <code>GC.Collect</code> in the <code>Application_EndRequest</code> Method of <code>Global.asax</code> and everything as of now is working fine. But I know that it is strictly not recommend to use the same.</p>
  
  <p>Any help will be GREATLY appreciated as I am stuck @ present.. </p>