Server Error in '/' Application - max pool size was reached

Discussion in 'Databases' started by tigercat, Apr 27, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Please assist, users to my site are constantly complaining about this error. When they visit the site everything works fine then suddenly everything slows down then the error comes up. Sometimes when they try to visit the site, the site takes just to long to load up then the error below comes up. Please advise. Thanks.

    Is this a server error or problem with our coding?

    Here is the error:
    Server Error in '/' Application.




    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.

    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.

    Source Error: </o:p>




    Code:
    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.
    </o:p>

    Stack Trace: </o:p>



    </o: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.]</o:p> System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean&amp; isInTransaction) +394</o:p> System.Data.SqlClient.SqlConnection.Open() +384</o:p> System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState&amp; originalState) +44</o:p> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304</o:p> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77</o:p> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38</o:p> disappointingnews.index.FillGrid()</o:p> disappointingnews.index.Page_Load(Object sender, EventArgs e)</o:p> System.Web.UI.Control.OnLoad(EventArgs e) +67</o:p> System.Web.UI.Control.LoadRecursive() +35</o:p> System.Web.UI.Page.ProcessRequestMain() +750</o:p>
    </o:p>



    Version Information:Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032</o:p>
    </o:p>
     
  2. Usually it is a problem with connections not being properly closed. Are you still experiencing the problem?



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  3. Bruce

    Bruce DiscountASP.NET Staff

  4. Thanks a lot Bruce and Joel, I will forward this to my web designer, he has been insisting that this is a server problem and that
    we ask to moved to another server. I know this is asking too much, but is there a sample code that you can provide so that
    I can forward to my web designer to fix this problem? Once again thanks a lot.
     
  5. You'll have the same problem moving to another server, if you use the same code.


    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    No.. can't really give you sample code on how to fix this issue. He/she just need to make sure all db connections are closed properly after use.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  7. Thanks a lot Joel and Bruce, my designer closed all the connections and for two days everything was running
    fine, but now my users are getting a different kind of server error, "server error in '/'Application - timeout
    expired - server is not responding"

    Before it was max pool size reached and now itisprior to completion of operation or server is not
    responding.

    Here is the error our users are getting, please advise, thanks.


    Server Error in '/' Application.



    Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    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.

    Exception Details: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

    Source Error: </o:p>




    Code:
    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.
    </o:p>

    Stack Trace: </o:p>



    </o:p>[SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]</o:p> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) +742</o:p> System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) +44</o:p> System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +5</o:p> System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304</o:p> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77</o:p> System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +38</o:p> disappointingnews.index.FillGrid()</o:p> disappointingnews.index.Page_Load(Object sender, EventArgs e)</o:p> System.Web.UI.Control.OnLoad(EventArgs e) +67</o:p> System.Web.UI.Control.LoadRecursive() +35</o:p> System.Web.UI.Page.ProcessRequestMain() +750</o:p>
    </o:p>



    Version Information:Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
     
  8. Thanks Joel. Well, this issue happens when users click on links within the site, it doesn't matter which
    link users click on; so it must be happening on multiple queries. My web designers claim that this may
    be a server problem, they are currently reviewing all the queries to alleviate this problem. If you have any tip
    on this issue then I would appreciate it. Once again thanks.
     
  9. I would doubt it's a problem with the server. I've seen some pretty high traffic sites that use sql without any issues. The majority of the time, it's a coding issue.


    Most of the time I've seen problems like this, is with sites that do not close their connections properly. Though without seeing your code, it's not really possible to diagnose the problem.



    Joel Thoms
    DiscountASP.NET
    http://www.DiscountASP.NET
     
  10. Once again thanks Joel, you are right the cause of the whole issue was open connections, by web designer
    just informed that they have closed all open connections and it seems the problem is gone. Thanks.
     
  11. Bruce

    Bruce DiscountASP.NET Staff

  12. Once again thanks.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page