-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: mysql too many connecion
PostPosted: Sat Nov 25, 2006 5:12 pm 
Newbie

Joined: Sat Nov 25, 2006 5:07 pm
Posts: 3
hi all
i'm running my .net application and afer few minutes i get
this error
2006-11-25 21:17:26,921 ERROR 91 0 0 0 An exception occurred: cannot open connection
NHibernate.ADOException: cannot open connection ---> NHibernate.ADOException: Could not create connection from Driver ---> MySql.Data.My
qlClient.MySqlException: #08004Too many connections
in MySql.Data.MySqlClient.PacketReader.CheckForError()
in MySql.Data.MySqlClient.PacketReader.ReadHeader()
in MySql.Data.MySqlClient.PacketReader.OpenPacket()
in MySql.Data.MySqlClient.NativeDriver.Authenticate411()
in MySql.Data.MySqlClient.NativeDriver.Authenticate()
in MySql.Data.MySqlClient.NativeDriver.Open()
in MySql.Data.MySqlClient.Driver.Create(MySqlConnectionString settings)
in MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
in MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
in MySql.Data.MySqlClient.MySqlPool.GetConnection()
in MySql.Data.MySqlClient.MySqlPoolManager.GetConnection(MySqlConnectionString settings)
in MySql.Data.MySqlClient.MySqlConnection.Open()
in NHibernate.Connection.DriverConnectionProvider.GetConnection()
--- Fine dell'analisi dello stack dell'eccezione interna ---
in NHibernate.Connection.DriverConnectionProvider.GetConnection()
in NHibernate.Impl.SessionFactoryImpl.OpenConnection()
--- Fine dell'analisi dello stack dell'eccezione interna ---
in NHibernate.Impl.SessionFactoryImpl.OpenConnection()
in NHibernate.Impl.SessionImpl.Connect()
in NHibernate.Impl.SessionImpl.get_Connection()
in NHibernate.Transaction.AdoTransaction.Begin(IsolationLevel isolationLevel)
in NHibernate.Transaction.TransactionFactory.BeginTransaction(ISessionImplementor session, IsolationLevel isolationLevel)
in NHibernate.Transaction.TransactionFactory.BeginTransaction(ISessionImplementor session)
in NHibernate.Impl.SessionImpl.BeginTransaction()
in interact.VideoSystem.Checks.CheckAviXml() in C:\var\projects\videosystem\3.0\VideoServiceSvc\Checks.vb:riga 348
2006-11-25 21:17:57,171 ERROR 91 0 0 0 An exception occurred: cannot open connection
NHibernate.ADOException: cannot open connection ---> NHibernate.ADOException: Could not create connection from Driver ---> MySql.Data.My
qlClient.MySqlException: #08004Too many connections
in MySql.Data.MySqlClient.PacketReader.CheckForError()
in MySql.Data.MySqlClient.PacketReader.ReadHeader()
in MySql.Data.MySqlClient.PacketReader.OpenPacket()
in MySql.Data.MySqlClient.NativeDriver.Authenticate411()
in MySql.Data.MySqlClient.NativeDriver.Authenticate()


I have no ideat how to solve this
can someone help me?
thanks
z


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 27, 2006 10:51 am 
Newbie

Joined: Mon Jun 05, 2006 8:51 am
Posts: 18
Do you Dispose() your sessions?
Code:
using(ISession session = SessionFactory.OpenSession())
{
    // Database access code here
}


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 28, 2006 1:59 pm 
Newbie

Joined: Sat Nov 25, 2006 5:07 pm
Posts: 3
Dispose() is not available on connections obtained from SessionFactory.OpenSession(). At least not in vb.net... we use Close() instead.
We found out anyway, it was an issue whith subs returning before they Close()d those sessions.

this is what we can say
please give us some feedbacks
Z


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.