首页 > 解决方案 > PruneConnectionPoolGroups 中的内存不足异常

问题描述

我们有一个 Windows 服务抛出错误并关闭并出现以下错误:

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)

我在 PruneConnectionPoolGroups 中查看了这个错误,并且有一些迹象表明当池在事务完成之前尝试关闭连接时会导致竞争条件,但这是一个猜测。有没有人见过这个错误并找到了解决方案?

标签: c#sql-serversystem.data

解决方案


推荐阅读