HighTechTalks DotNet Forums  

EntLib for .NET 2.0 - January 2006 and MySQL

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss EntLib for .NET 2.0 - January 2006 and MySQL in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
rockdale
 
Posts: n/a

Default EntLib for .NET 2.0 - January 2006 and MySQL - 12-26-2007 , 03:58 PM






Hi, all:

My web application using MS EntLib for .net 2.0 (Jan 2006) to access
my backend database. It works fine with MS SQL 2k. Now we are migrate
from MS SQL to mySQL. Everything looks fine except one serious
problem: we got the "too many connections" error. Looks like the
EntLib did not properly close these connections.

on mySQL Administrator> server connections> Threads I can see a new
thread created after a couple of DatabaseFactory.CreateDatabase()
functions being called;

I am suppose that the EntLib will close the connectons and return it
back to connection pool?

my database access function looks like:

Database db = DatabaseFactory.CreateDatabase();
define DBcommand
execute command (db.ExecuteScalar, db.ExecuteDataSet or
db.ExecuteReader)

Am I miss anything? Help please.

Thanks in advance
-rockdale


Reply With Quote
  #2  
Old   
rockdale
 
Posts: n/a

Default Re: EntLib for .NET 2.0 - January 2006 and MySQL - 12-26-2007 , 04:21 PM






This is the error message and trace info:

This happens even I kill all connections:

Exception Details: MySql.Data.MySqlClient.MySqlException: error
connecting: 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:

[MySqlException (0x80004005): error connecting: 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.]
MySql.Data.MySqlClient.MySqlPool.GetConnection() +124
MySql.Data.MySqlClient.MySqlConnection.Open() +223

Microsoft.Practices.EnterpriseLibrary.Data.Databas e.OpenConnection()
in C:\WorkSpace\Microsoft Enterprise Library January 2006\src\Data
\Database.cs:1222

Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteScalar(DbCommand
command) in C:\WorkSpace\Microsoft Enterprise Library January 2006\src
\Data\Database.cs:588
DataAccess.UserLogin(String pLoginId, String pPwd, String
pUserHost) +105
Pages_Login.ButtonLogin_OnClick(Object sender, EventArgs e) +111
System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs
e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBac kEvent(String
eventArgument) +115

System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42


On Dec 26, 3:58*pm, rockdale <rockdale.gr... (AT) gmail (DOT) com> wrote:
Quote:
Hi, all:

My web application using MS EntLib for .net 2.0 (Jan 2006) to access
my backend database. It works fine with MS SQL 2k. Now we are migrate
from MS SQL to mySQL. Everything looks fine except one serious
problem: *we got the "too many connections" error. Looks like the
EntLib did not properly close these connections.

on mySQL Administrator> server connections> Threads I can see a new
thread created after a couple of DatabaseFactory.CreateDatabase()
functions being called;

I am suppose that the EntLib will close the connectons and return it
back to connection pool?

my database access function looks like:

Database db = DatabaseFactory.CreateDatabase();
define DBcommand
execute command *(db.ExecuteScalar, db.ExecuteDataSet or
db.ExecuteReader)

Am I miss anything? Help please.

Thanks in advance
-rockdale


Reply With Quote
  #3  
Old   
sloan
 
Posts: n/a

Default Re: EntLib for .NET 2.0 - January 2006 and MySQL - 12-27-2007 , 11:36 AM




Who created the concrete implementation for the MySql database?

http://www.google.com/search?source=...ibrary+My Sql

You'll need to find those people and use their support.

The framework includes (if I recall correctly) Sql Server , Oracle and DB2.
(Aka, the included concrete versions)

But someone else has written the concrete version for MySql.




"rockdale" <rockdale.green (AT) gmail (DOT) com> wrote

This is the error message and trace info:

This happens even I kill all connections:

Exception Details: MySql.Data.MySqlClient.MySqlException: error
connecting: 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:

[MySqlException (0x80004005): error connecting: 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.]
MySql.Data.MySqlClient.MySqlPool.GetConnection() +124
MySql.Data.MySqlClient.MySqlConnection.Open() +223

Microsoft.Practices.EnterpriseLibrary.Data.Databas e.OpenConnection()
in C:\WorkSpace\Microsoft Enterprise Library January 2006\src\Data
\Database.cs:1222

Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteScalar(DbCommand
command) in C:\WorkSpace\Microsoft Enterprise Library January 2006\src
\Data\Database.cs:588
DataAccess.UserLogin(String pLoginId, String pPwd, String
pUserHost) +105
Pages_Login.ButtonLogin_OnClick(Object sender, EventArgs e) +111
System.Web.UI.WebControls.ImageButton.OnClick(Imag eClickEventArgs
e) +105
System.Web.UI.WebControls.ImageButton.RaisePostBac kEvent(String
eventArgument) +115

System.Web.UI.WebControls.ImageButton.System.Web.U I.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42


On Dec 26, 3:58 pm, rockdale <rockdale.gr... (AT) gmail (DOT) com> wrote:
Quote:
Hi, all:

My web application using MS EntLib for .net 2.0 (Jan 2006) to access
my backend database. It works fine with MS SQL 2k. Now we are migrate
from MS SQL to mySQL. Everything looks fine except one serious
problem: we got the "too many connections" error. Looks like the
EntLib did not properly close these connections.

on mySQL Administrator> server connections> Threads I can see a new
thread created after a couple of DatabaseFactory.CreateDatabase()
functions being called;

I am suppose that the EntLib will close the connectons and return it
back to connection pool?

my database access function looks like:

Database db = DatabaseFactory.CreateDatabase();
define DBcommand
execute command (db.ExecuteScalar, db.ExecuteDataSet or
db.ExecuteReader)

Am I miss anything? Help please.

Thanks in advance
-rockdale



Reply With Quote
  #4  
Old   
rockdale
 
Posts: n/a

Default Re: EntLib for .NET 2.0 - January 2006 and MySQL - 12-28-2007 , 12:22 PM



Thanks, I think I figured it out. I ran my application on debug mode
and throw exceptions then I stoip the debugging, that's why the
connection is not closed ? I believe. Since after 2 days I do not have
this problem anymore.

The concrete implementation is downloaded from mysql website, they
called it .net connector.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.