I'm currently using active record 2.0 in a windows service and I'm
getting a very odd error that ends up unloading the app domain and
bringing down the windows service.  Here's the error I get:

2011-05-07 12:06:59,314 [25] ERROR Adding the given count to the
semaphore would cause it to exceed its maximum count.
System.Threading.SemaphoreFullException: Adding the given count to the
semaphore would cause it to exceed its maximum count.
   at System.Threading.Semaphore.Release(Int32 releaseCount)
   at System.Data.ProviderBase.DbConnectionPool.CleanupCallback(Object
state)
   at System.Threading._TimerCallback.TimerCallback_Context(Object
state)
   at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   at System.Threading._TimerCallback.PerformTimerCallback(Object
state)

This seems to indicate that some object is trying to return a
connection to the sql connection pool when it shouldn't be.  Has
anyone experienced any problems like this with active record?

I am also using some custom sql in my application and invoking a third
party application that connects to databases, so it is entirely
possible the problem is in that area and has nothing to do with
activerecord.

But I thought I would ask users in this group if they've ever
experienced any problems like this with AR?  Also, is it possible to
turn connection pooling off with AR?  I've put pooling=false in the
connection string section the activerecord config section (see below),
but not sure if this is sufficient to do it.

Thanks!

<activerecord
    isWeb="false"
    isDebug="false"
    >
    <config>
      <add key="connection.provider"
           value="NHibernate.Connection.DriverConnectionProvider" />
      <add key="dialect"
           value="NHibernate.Dialect.MsSql2005Dialect" />
      <add key="connection.driver_class"
           value="NHibernate.Driver.SqlClientDriver" />
      <add key="connection.connection_string"
           value="Data Source=(local);Initial
Catalog=dbname;uid=*****;pwd=*****;pooling=false" />
      <add key="proxyfactory.factory_class"
           value="NHibernate.ByteCode.Castle.ProxyFactoryFactory,
NHibernate.ByteCode.Castle" />
      <add key="query.factory_class"
           value="NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory,
NHibernate" />
    </config>
  </activerecord>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to