Time out issue to connect to Sql server

Discussion in 'ASP .Net' started by Dale, Jun 7, 2005.

  1. Dale

    Dale Guest

    Hi,
    I encountered this error when I debug my asp.net web application.
    What might be the reason? How can I resolve this? Thanks!

    Server Error in '/ETS' 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:


    Line 224:
    Line 225: if (conn.State != ConnectionState.Open)
    Line 226: conn.Open();
    Line 227:
    Line 228: cmd.Connection = conn;


    Source File: C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs Line:
    226

    Stack Trace:


    [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.]

    System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
    tionString options, Boolean& isInTransaction)
    System.Data.SqlClient.SqlConnection.Open()
    ETS.Framework.DAL.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection
    conn, SqlTransaction trans, CommandType cmdType, String cmdText,
    SqlParameter[] cmdParms) in
    C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs:226
    ETS.Framework.DAL.SqlHelper.ExecuteReader(String connString, CommandType
    cmdType, String cmdText, SqlParameter[] cmdParms) in
    C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs:129
    ETS.Business.DAL.SQLDataAccessLayer.GetCampusByCode(String CampusCode) in
    C:\Inetpub\wwwroot\ETS\ETS.Business\DAL\SQLDataAccessLayer.cs:401
    ETS.Business.BLL.Campus.GetCampusByCode(String CampusCode) in
    C:\Inetpub\wwwroot\ETS\ETS.Business\BLL\Campus.cs:68
    ETS.Web.UserControl.Menu.Page_Load(Object sender, EventArgs e) in
    c:\inetpub\wwwroot\ETS\UserControl\Menu.ascx.cs:21
    System.Web.UI.Control.OnLoad(EventArgs e)
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Control.LoadRecursive()
    System.Web.UI.Page.ProcessRequestMain()





    ----------------------------------------------------------------------------
    ----

    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
    Version:1.1.4322.573
     
    Dale, Jun 7, 2005
    #1
    1. Advertising

  2. Dale

    Scott Allen Guest

    Dale:

    Does this only happen when you are in the debugger?

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Tue, 7 Jun 2005 16:11:34 +0800, "Dale" <>
    wrote:

    >Hi,
    >I encountered this error when I debug my asp.net web application.
    >What might be the reason? How can I resolve this? Thanks!
    >
    >Server Error in '/ETS' 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:
    >
    >
    >Line 224:
    >Line 225: if (conn.State != ConnectionState.Open)
    >Line 226: conn.Open();
    >Line 227:
    >Line 228: cmd.Connection = conn;
    >
    >
    >Source File: C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs Line:
    >226
    >
    >Stack Trace:
    >
    >
    >[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.]
    >
    >System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
    >tionString options, Boolean& isInTransaction)
    > System.Data.SqlClient.SqlConnection.Open()
    > ETS.Framework.DAL.SqlHelper.PrepareCommand(SqlCommand cmd, SqlConnection
    >conn, SqlTransaction trans, CommandType cmdType, String cmdText,
    >SqlParameter[] cmdParms) in
    >C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs:226
    > ETS.Framework.DAL.SqlHelper.ExecuteReader(String connString, CommandType
    >cmdType, String cmdText, SqlParameter[] cmdParms) in
    >C:\Inetpub\wwwroot\ETS\ETS.Framework\DAL\SqlHelper.cs:129
    > ETS.Business.DAL.SQLDataAccessLayer.GetCampusByCode(String CampusCode) in
    >C:\Inetpub\wwwroot\ETS\ETS.Business\DAL\SQLDataAccessLayer.cs:401
    > ETS.Business.BLL.Campus.GetCampusByCode(String CampusCode) in
    >C:\Inetpub\wwwroot\ETS\ETS.Business\BLL\Campus.cs:68
    > ETS.Web.UserControl.Menu.Page_Load(Object sender, EventArgs e) in
    >c:\inetpub\wwwroot\ETS\UserControl\Menu.ascx.cs:21
    > System.Web.UI.Control.OnLoad(EventArgs e)
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Control.LoadRecursive()
    > System.Web.UI.Page.ProcessRequestMain()
    >
    >
    >
    >
    >
    >----------------------------------------------------------------------------
    >----
    >
    >Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
    >Version:1.1.4322.573
    >
     
    Scott Allen, Jun 7, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page