From: umesh s. (JIRA) <nh...@gm...> - 2011-06-23 10:49:41
|
[ http://216.121.112.228/browse/NH-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21320#action_21320 ] umesh satavase commented on NH-527: ----------------------------------- hi , the module u have attached will not return the begintransaction() or endtransaction() methods for Instance property. Similarly, the session per request per with detached objects in not reflecting clearly here. Can you please share the real code or explain me the issue solution. Still, Idont understand about how you will control upon the stale connections in Pool lying there to make them active. I have been closing the session after evry use but still connections becomes unavaialable next time if I use them even if they are lying in the Pool. Please help in this regard. > connection pooling has problems in stress test. > ----------------------------------------------- > > Key: NH-527 > URL: http://216.121.112.228/browse/NH-527 > Project: NHibernate > Issue Type: Bug > Affects Versions: 1.0.1 > Reporter: Oliver Paulus > Priority: Blocker > Attachments: NHibernateSessionManager.cs, NHibernateSessionModule.cs > > > I have made a stress test of my application. After some time I saw that the memory is growing and at a point the application craches on each request. I get the following error message: > System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> NHibernate.ADOException: Could not execute query ---> NHibernate.ADOException: cannot open connection ---> NHibernate.ADOException: Could not create connection from Driver ---> 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. > at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) > at System.Data.SqlClient.SqlConnection.Open() > at NHibernate.Connection.DriverConnectionProvider.GetConnection() > --- End of inner exception stack trace --- > at NHibernate.Connection.DriverConnectionProvider.GetConnection() > at NHibernate.Impl.SessionFactoryImpl.OpenConnection() > --- End of inner exception stack trace --- > at NHibernate.Impl.SessionFactoryImpl.OpenConnection() > at NHibernate.Impl.SessionImpl.get_Connection() > at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand command) > at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) > at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) > at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) > at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) > at NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters) > at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) > --- End of inner exception stack trace --- > at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) > at NHibernate.Impl.SessionImpl.Find(String query) > It seems that the connection pool will not release used connections. I can wait but no used collections will be released. I have to restart the application on the webserver. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |