3

We have a windows service that is throwing errors and shutting down with the following error:

Failed to stop service. System.InvalidOperationException: An unhandled exception was detected ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Data.ProviderBase.DbConnectionFactory.PruneConnectionPoolGroups(Object state)

   at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
   at System.Threading.TimerQueue.AppDomainTimerCallback(Int32 id)

I have looked around for this error in the PruneConnectionPoolGroups and there is some indication that a race condition is caused when the pool is trying to shut down the connection before the transaction completes, but this a guess. Has anyone seen this error before and found a solution for it?

john
  • 1,273
  • 3
  • 16
  • 41

0 Answers0