Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Error... The timeout period elapsed prior to obtaining a connection from the pool

[es] :: .NET :: Error... The timeout period elapsed prior to obtaining a connection from the pool

[ Pregleda: 3486 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

vanhulio
student
Beograd

Član broj: 72088
Poruke: 40
*.dynamic.sbb.co.yu.



Profil

icon Error... The timeout period elapsed prior to obtaining a connection from the pool31.07.2006. u 17:03 - pre 215 meseci
Cesto mi se desava da na shared hostingu dobijem sledeci error:

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

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"]
        }


Gde bi trebao da trazim problem, da li je do mene ili servera?

Two items walk into a ToolBar.
The bartender says, “Can I get you a menu?”
“No thanks, we're looking for a little action.”
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
216.5.82.*



+2 Profil

icon Re: Error... The timeout period elapsed prior to obtaining a connection from the pool31.07.2006. u 19:08 - pre 215 meseci
DEFAULT POOL CONNECTION ti je 15, treba da povecas to.
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
216.5.82.*



+2 Profil

icon Re: Error... The timeout period elapsed prior to obtaining a connection from the pool31.07.2006. u 19:12 - pre 215 meseci
sad sam tek vidio... moras da zatvoris konekciju, to ce ti dovesti do ovakvih pojava ukoliko ne uradis connection.close();

Ovako nesto..


Citat:
vanhulio: Cesto mi se desava da na shared hostingu dobijem sledeci error:

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;

             // uradi sta treba da uradis 
               neka_funkjcija();

             // zatvori konekciju
              conn.Close();

        }
        else
        {
            //inace koristim Session["SqlConn"]
        }


 
Odgovor na temu

vanhulio
student
Beograd

Član broj: 72088
Poruke: 40
*.dynamic.sbb.co.yu.



Profil

icon Re: Error... The timeout period elapsed prior to obtaining a connection from the pool31.07.2006. u 21:06 - pre 215 meseci
Radim tako po uputstvu hosting kompanije.
Znaci rekli su mi ovako (valjda njihova politika) samo sam ja preveo na .net.
> <%
> If IsObject( Session("SQLCon")) Then
> Set SQLCon = Session("SQLCon")
> Else
> Set SQLCon = Server.CreateObject("ADODB.Connection")
> SQLCon.Open "connection_string"
> SQLCon.CommandTimeout = 60
> Session("SQLCon") = SQLCon
> End If
> %>

+ su naglasili posebno da se connection objekat ne zatvara.

Hteo sam ovde da proverim da li mozda ja pravim neku gresku koju sam predvideo.
E sad moracu njih da cimam, da vidim u cemu je problem.
Two items walk into a ToolBar.
The bartender says, “Can I get you a menu?”
“No thanks, we're looking for a little action.”
 
Odgovor na temu

01011011

Član broj: 561
Poruke: 2341
216.5.82.*



+2 Profil

icon Re: Error... The timeout period elapsed prior to obtaining a connection from the pool31.07.2006. u 22:22 - pre 215 meseci
pa uradi...

Code:
 conn.Close(); 


to sam ti napisao, kod njih to nema,..
 
Odgovor na temu

vanhulio
student
Beograd

Član broj: 72088
Poruke: 40
*.dynamic.sbb.co.yu.



Profil

icon Re: Error... The timeout period elapsed prior to obtaining a connection from the pool03.08.2006. u 17:05 - pre 215 meseci
Kao sto rekoh,

Citat:

+ su naglasili posebno da se connection objekat ne zatvara.


Danas mi se desila ista situacija da izbacije error, medjutim pogledao sam broj aktivnih sesija i u tom trenutku je bilo nesto preko 230, sto je malo nerealna posecenost za sada.

Ono sto mi pada na pamet jeste da se sesije ne gase pravilno od strane procesa.
Nakon sto sam resetovao aplikaciju, sve se vratilo u normalu.

Da li ima neko ideju o cemu se radi?
Two items walk into a ToolBar.
The bartender says, “Can I get you a menu?”
“No thanks, we're looking for a little action.”
 
Odgovor na temu

[es] :: .NET :: Error... The timeout period elapsed prior to obtaining a connection from the pool

[ Pregleda: 3486 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.