Cesto mi se desava da na shared hostingu dobijem sledeci error:
Prilikom poziva svake aspx strane izvrsava se sledeci kod, znaci za svaku novu sesiju se dodeljuje jedna konekcija ka bazi koja se ne zatvara dok sesija traje.
Gde bi trebao da trazim problem, da li je do mene ili servera?
Code:
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.
...
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(SqlConnectionString options, Boolean& isInTransaction) +396
System.Data.SqlClient.SqlConnection.Open() +384
_ASP.pregled_aspx.Page_Load(Object src, EventArgs e) +109
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
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.
...
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(SqlConnectionString options, Boolean& isInTransaction) +396
System.Data.SqlClient.SqlConnection.Open() +384
_ASP.pregled_aspx.Page_Load(Object src, EventArgs e) +109
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Prilikom poziva svake aspx strane izvrsava se sledeci kod, znaci za svaku novu sesiju se dodeljuje jedna konekcija ka bazi koja se ne zatvara dok sesija traje.
Code:
if (Session["SqlConn"] == null)
{
string connString = ConfigurationSettings.AppSettings["ConnectionString"];
if (connString == null || connString.Length <= 0)
throw (new ApplicationException("ConnectionString configuration is missing"));
SqlConnection conn = new SqlConnection(connString);
conn.Open();
//koristim conn i stavljam ga u session kolekciju
Session["SqlConn"] = conn;
}
else
{
//inace koristim Session["SqlConn"]
}
if (Session["SqlConn"] == null)
{
string connString = ConfigurationSettings.AppSettings["ConnectionString"];
if (connString == null || connString.Length <= 0)
throw (new ApplicationException("ConnectionString configuration is missing"));
SqlConnection conn = new SqlConnection(connString);
conn.Open();
//koristim conn i stavljam ga u session kolekciju
Session["SqlConn"] = conn;
}
else
{
//inace koristim Session["SqlConn"]
}
Gde bi trebao da trazim problem, da li je do mene ili servera?
Potpis
Two items walk into a ToolBar.
The bartender says, “Can I get you a menu?”
“No thanks, we're looking for a little action.”
The bartender says, “Can I get you a menu?”
“No thanks, we're looking for a little action.”