Uploaded image for project: 'NHibernate [Moved to GitHub]'
  1. NH-527

connection pooling has problems in stress test.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: External Issue
    • Affects versions: 1.0.1
    • Fix versions: None
    • Components: None
    • Labels:
      None
    • Sprint:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              oliver@code-project.org Oliver Paulus
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?