我们最近在生产环境中遇到了一个 WCF Web 服务崩溃的问题。我们在崩溃期间进行了内存转储,当我们使用 windbg 进行调试时,我们得到了以下堆栈跟踪
* *异常对象:000000000a1e5db8 异常类型:System.ObjectDisposedException 消息:无法访问已处置的对象。内部异常:
enter code here
**StackTrace(生成):System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.ThrowIfClosed()+0xfb2737 System_ServiceModel_ni!System.ServiceModel.Channels.ServiceChannel.CleanupChannelCollections()+0x37 System_ServiceModel_ni!System.ServiceModel.Channels.ServiceChannel.OnAbort()+ 0x78 System_ServiceModel_ni!System.ServiceModel.Channels.CommunicationObject.Abort()+0x28e System_ServiceModel_ni!System.ServiceModel.Channels.ServiceChannel+SessionIdleManager.TimerCallback()+0x6c System_Runtime_DurableInstancing_ni!System.Runtime.IOThreadScheduler+ScheduledOverlapped.IOCallback(UInt32, UInt32, System .Threading.NativeOverlapped*)+0x71 System_Runtime_DurableInstancing_ni!System.Runtime.Fx+IOCompletionThunk.UnhandledExceptionFrame(UInt32, UInt32, System.Threading.NativeOverlapped*)+0xdbc70 mscorlib_ni!System。Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)+0x96** StackTraceString:HResult:80131622 StackTraceString:HResult:80131622**
有人可以更深入地了解此异常何时发生。
WCF Web 服务在使用 .net 框架 4.0 的 Windows 2008 服务器上运行。
其他详情:
ConcurrencyMode = Multiple
InstanceContextMode = PerSession
我们的 web 服务调用其他几个 wcf 服务。这些的绑定和行为信息如下。
<behavior name="NAME">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentSessions="1000" maxConcurrentCalls="1000" maxConcurrentInstances="10`enter code here`00"/>
<dataContractSerializer maxItemsInObjectGraph="655360"/>
</behavior>
<binding name="NAME" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="50" maxBufferPoolSize="524288" maxBufferSize="10485760" maxConnections="150" maxReceivedMessageSize="10485760">
<readerQuotas maxDepth="32" maxStringContentLength="10485760" maxArrayLength="10485760" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="None">
<transport clientCredentialType="Windows" protectionLevel="None" />
</security>
</binding>