Time out issue to connect to Sql server


D

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()
 
Ad

Advertisements

S

Scott Allen

Dale:

Does this only happen when you are in the debugger?

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

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()





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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top