title: timeout period elapsed. all pooled connections were in use and max pool size reached
body: <p>After some time the following error page is shown.</p>
  
  <p>What can I do to prevent this?</p>
  
  <p>I have large numbers of users and the app uses Oracle 11g.  Please suggest me pool size so can be extended default max pool size is 100. </p>
  
  <p>I have checked all connections properly closed. I am using <code>OracleDataReader</code> and <code>Datatable</code> in my application Method that i am using is as under:</p>
  
  <pre><code> public OracleDataReader BidNoIncr()
      {
          OracleConnection objOracleConnection = new OracleConnection(objDBClass.GetConnSring());
          OracleDataReader objDataReader;
          string strQuery = "Select max(BID_NO)+1 as SNumber from HH_BIDS";
          OracleCommand objOracleCommand = new OracleCommand(strQuery, objOracleConnection);
             objOracleConnection.Open();
             objDataReader = objOracleCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection);       
              return objDataReader;
  </code></pre>
  
  <blockquote>
    <p>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.  Description:
    An unhandled exception occurred during the execution of the current
    web request. Please review the stack trace for more information about
    the error and where it originated in the code. </p>
    
    <p>Exception Details: 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.</p>
    
    <p>Source Error:  An unhandled exception was generated during the
    execution of the current web request. Information regarding the origin
    and location of the exception can be identified using the exception
    stack trace below. </p>
    
    <p>Stack Trace: </p>
    
    <p>[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.]<br>
    System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
    owningConnection) +309609<br>
    System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory) +125<br>
    System.Data.OracleClient.OracleConnection.Open() +43<br>
    DbClass.GetConnSring() +58    DBViewRec.ViewSalvageItems() +53<br>
    viewsalvageitems.ShowRecords() +44<br>
    viewsalvageitems.Page_Load(Object sender, EventArgs e) +5<br>
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object
    o, Object t, EventArgs e) +14<br>
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
    EventArgs e) +35    System.Web.UI.Control.OnLoad(EventArgs e) +91<br>
    System.Web.UI.Control.LoadRecursive() +74<br>
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    +2207</p>
  </blockquote>