WCF服务因“故障”而停止响应;信号灯超时时间已过期";
我有一个自我托管的WCF服务在工作几天后停止响应 在客户端,我得到了这个错误-WCF服务因“故障”而停止响应;信号灯超时时间已过期";,wcf,Wcf,我有一个自我托管的WCF服务在工作几天后停止响应 在客户端,我得到了这个错误- The request channel timed out while waiting for a reply after 00:00:59.8719872. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to th
The request channel timed out while waiting for a reply after 00:00:59.8719872. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.
我已经在服务器端启用了跟踪,这就是我在错误中得到的结果-
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
<EventID>131075</EventID>
<Type>3</Type>
<SubType Name="Error">0</SubType>
<Level>2</Level>
<TimeCreated SystemTime="2012-02-01T04:30:12.1624528Z" />
<Source Name="System.ServiceModel" />
<Correlation ActivityID="{1fbbf506-77e3-46cf-8a5d-e9ddba1ce43a}" />
<Execution ProcessName="****************" ProcessID="4232" ThreadID="27" />
<Channel />
<Computer>ESAPI</Computer>
</System>
<ApplicationData>
<TraceData>
<DataItem>
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
<TraceIdentifier>http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspx</TraceIdentifier>
<Description>Throwing an exception.</Description>
<AppDomain>**********.exe</AppDomain>
<Exception>
<ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The semaphore timeout period has expired</Message>
<StackTrace>
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpRequestContext.OnReply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.SecurityRequestContext.OnReply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage9(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage8(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.Start()
at System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveRequestAndVerifySecurityAsyncResult.ReceiveMessage(Object state)
at System.Runtime.ActionItem.DefaultActionItem.Invoke()
at System.Runtime.ActionItem.CallbackHelper.InvokeWithoutContext(Object state)
at System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
</StackTrace>
<ExceptionString>System.ServiceModel.CommunicationException: The semaphore timeout period has expired ---> System.Net.HttpListenerException: The semaphore timeout period has expired
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.ServiceModel.Channels.BytesReadPositionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
--- End of inner exception stack trace ---</ExceptionString>
<InnerException>
<ExceptionType>System.Net.HttpListenerException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The semaphore timeout period has expired</Message>
<StackTrace>
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.ServiceModel.Channels.BytesReadPositionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)
</StackTrace>
<ExceptionString>System.Net.HttpListenerException (0x80004005): The semaphore timeout period has expired
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.ServiceModel.Channels.BytesReadPositionStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(Byte[] buffer, Int32 offset, Int32 count)</ExceptionString>
<NativeErrorCode>79</NativeErrorCode>
</InnerException>
</Exception>
</TraceRecord>
</DataItem>
</TraceData>
</ApplicationData>
</E2ETraceEvent>
131075
3.
0
2.
埃萨皮
http://msdn.microsoft.com/en-US/library/System.ServiceModel.Diagnostics.ThrowingException.aspx
正在引发异常。
**********.exe
System.ServiceModel.CommunicationException,System.ServiceModel,版本=4.0.0.0,区域性=中性,PublicKeyToken=b77a5c561934e089
信号量超时时间已过期
位于System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
位于System.ServiceModel.Channels.HttpOutput.Send(TimeSpan超时)
位于System.ServiceModel.Channels.HttpRequestContext.OnReply(消息消息,TimeSpan超时)
位于System.ServiceModel.Channels.RequestContextBase.Reply(消息消息,TimeSpan超时)
位于System.ServiceModel.Channels.SecurityChannelListener`1.SecurityRequestContext.OnReply(消息消息,TimeSpan超时)
位于System.ServiceModel.Channels.RequestContextBase.Reply(消息消息,TimeSpan超时)
位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.Reply(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage9(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage8(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage41(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage3(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.ImmutableDispatcheRuntime.ProcessMessage1(MessageRpc&;rpc)
位于System.ServiceModel.Dispatcher.MessageRpc.Process(布尔isOperationContextSet)
位于System.ServiceModel.Dispatcher.ChannelHandler.DispatchedReleasePump(RequestContext请求、布尔cleanThread、OperationContext currentOperationContext)
位于System.ServiceModel.Dispatcher.ChannelHandler.HandlerRequest(RequestContext请求,OperationContext currentOperationContext)
位于System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult结果)
位于System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult结果)
在System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult结果)中
在System.Runtime.AsyncResult.Complete(布尔同步完成)
位于System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveItemAndVerifySecurityAsyncResult`2.Start()
位于System.ServiceModel.Channels.SecurityChannelListener`1.ReceiveRequestEstandVerifySecurityAsyncResult.ReceiveMessage(对象状态)
在System.Runtime.ActionItem.DefaultActionItem.Invoke()中
在System.Runtime.ActionItem.CallbackHelper.InvokeWithoutContext(对象状态)中
在System.Runtime.IOThreadScheduler.ScheduledOverlapped.IOCallback(UInt32错误代码,UInt32个字节,NativeOverlapped*NativeOverlapped)
在System.Runtime.Fx.IOCompletionThunk.UnhandledExceptionFrame(UInt32错误,UInt32字节读取,NativeOverlapped*NativeOverlapped)
在System.Threading.\u IOCompletionCallback.PerformiCompletionCallback(UInt32错误代码,UInt32个字节,本机重叠*pOVERLAP)
System.ServiceModel.CommunicationException:信号量超时时间已过---System.Net.HttpListenerException:信号量超时时间已过
在System.Net.HttpResponseStream.Write(字节[]缓冲区,Int32偏移量,Int32大小)
位于System.ServiceModel.Channels.ByteReadPositionStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
位于System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
---内部异常堆栈跟踪的结束---
System.Net.HttpListenerException,系统,版本=4.0.0.0,区域性=中性,PublicKeyToken=b77a5c561934e089
信号量超时时间已过期
在System.Net.HttpResponseStream.Write(字节[]缓冲区,Int32偏移量,Int32大小)
位于System.ServiceModel.Channels.ByteReadPositionStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
位于System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
System.Net.HttpListenerException(0x80004005):信号量超时时间已过期
在System.Net.HttpResponseStream.Write(字节[]缓冲区,Int32偏移量,Int32大小)
位于System.ServiceModel.Channels.ByteReadPositionStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
位于System.ServiceModel.Channels.HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream.Write(字节[]缓冲区,Int32偏移量,Int32计数)
79
有什么办法可以解决这个问题吗?
我还可以做些什么来获取更多详细信息?您能发布服务代码的摘录吗?服务似乎没有在定义的时间内向客户端返回响应。@oleksii-代码非常大,发布代码将是一个问题。为什么没有TimeOutException或某些有意义的异常而不是此异常?看起来您确实有一个TimeOutEx:“请求通道超时…”。是否有需要超过一分钟才能处理请求的代码?如果是,则可以增加错误消息中指定的等待值。如果调用很快,则存在某种类型的资源泄漏,服务无法在1分钟内返回响应(