Home All Groups Group Topic Archive Search About

Time out issue to connect to Sql server

Author
7 Jun 2005 8:11 AM
Dale
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

Author
7 Jun 2005 1:29 PM
Scott Allen
Dale:

Does this only happen when you are in the debugger?

Show quoteHide quote
On Tue, 7 Jun 2005 16:11:34 +0800, "Dale" <xiaomao.d***@intel.com>
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
>



Post Thread options