Tôi đang trong quá trình khắc phục sự cố Dịch vụ WCF bị treo tại một số điểm. Các hành vi dịch vụ như sau:WCF: maxConcurrentCalls đã cạn kiệt
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
thông số tốc độ nhâp là:
<serviceThrottling maxConcurrentCalls="50" maxConcurrentSessions="50" maxConcurrentInstances="50" />
Tiếp theo là trạng thái dịch vụ lấy từ một bãi chứa treo:
0:000> !mdt 0000000000c9f270 -r
0000000000c9f270 (System.ServiceModel.Dispatcher.ServiceThrottle)
calls:0000000000c9f3d8 (System.ServiceModel.Dispatcher.FlowThrottle)
capacity:0x32 (System.Int32)
count:0x32 (System.Int32)
mutex:0000000000c9f418 (System.Object)
<NO FIELDS>
release:0000000000c9f398 (System.Threading.WaitCallback)
_target:0000000000c9f270 (System.ServiceModel.Dispatcher.ServiceThrottle)
<RECURSIVE>
_methodBase:NULL (System.Reflection.MethodBase)
_methodPtr:0000064273dddf30 (System.IntPtr)
_methodPtrAux:0000000000000000 (System.IntPtr)
_invocationList:NULL (System.Object)
_invocationCount:0000000000000000 (System.IntPtr)
<NO FIELDS>
waiters:0000000000c9f430 (System.Collections.Generic.Queue`1[[System.Object, mscorlib]])
_array:0000000028d73e70 (System.Object[], Elements: 16)
_head:0x1 (System.Int32)
_tail:0xA (System.Int32)
_size:0x9 (System.Int32)
_version:0x22 (System.Int32)
_syncRoot:NULL (System.Object)
propertyName:0000000000c9f2b8 (System.String: "MaxConcurrentCalls")
configName:0000000000c9f358 (System.String: "maxConcurrentCalls")
sessions:0000000000c9f508 (System.ServiceModel.Dispatcher.FlowThrottle)
capacity:0x32 (System.Int32)
count:0x9 (System.Int32)
....
instanceContexts:000000000105ffc8 (System.ServiceModel.Dispatcher.FlowThrottle)
capacity:0x32 (System.Int32)
count:0x32 (System.Int32)
Như bạn thấy, maxConcurrentCalls đã hết, trong khi số phiên chỉ là 9. Tôi tự hỏi liệu điều này có thể gây ra do sự cố trong mã khách hàng về proxy hay không sử dụng, như xử lý ngoại lệ kém?
Đưa ra kết xuất bộ nhớ của dịch vụ, có cách nào để tìm khách hàng địa chỉ IP không?
TIA.
Xin chào, tôi có một vấn đề tương tự (vui lòng xem http://stackoverflow.com/questions/20842923/wcf-maxconcurrentsessions-exceeded). Bạn có thể cung cấp cho tôi thông tin bổ sung về giải pháp của bạn và gỡ lỗi tecnique không? Cảm ơn bạn! –