【发布时间】:2009-07-21 10:50:06
【问题描述】:
我已将服务/应用程序连接到 mssql 服务器,它有时会因以下堆栈跟踪而严重崩溃:
Uncaught exception: ArgumentOutOfRangeException - Specified argument was out of the range of valid values.
Parameter name: capacity, thrown at: mscorlib
Stack Trace:
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2..ctor(Int32 capacity, IEqualityComparer`1 comparer)
at System.Data.ProviderBase.DbConnectionFactory.PruneConnectionPoolGroups(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)
嗯,事实上,我不使用计时器,(而且我不确定计时器到底在哪里启动),我找不到这次崩溃的原因。 您是否有任何经验/您是否知道为什么会发生这种情况,以及如何避免它(或忽略它?)。服务的运行时间对我来说至关重要。
【问题讨论】:
-
你能贴出你的连接字符串吗(很明显是经过消毒的)?