- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我遇到一个应用程序池在处理一个请求时超时,它总是在 5 分钟左右超时。我已启用跟踪,但没有记录任何 Warning
、Error
、Critical
事件。 EventViewer
中也没有事件。我启用了 FailedReqLogging
并将其设置为记录超过 4 分 30 秒的任何请求。我在 C:\inetpub\logs\FailedReqLogFiles\W3SVC2
目录中找到了以下内容:
我应该更改哪些 IIS 设置来满足此请求?根据 Failure Reason
,它被列为 TIME_TAKEN
,所以我猜测 AppPool
超过了某个时间限制。这个限制是多少?
我还注意到 Final Status
列在 200
。这意味着我不会在日志中看到任何关于 Warning
、Critical
或 Fatal
的内容,因为它被记录为 OK
。我的假设是否正确?
下面是在客户端 跟踪日志中发现的异常堆栈跟踪。请注意,服务器跟踪日志中没有显示任何错误。奇怪的是,其中有多个嵌套异常,但没有一个具有实际值(value)。
...
...
<Exception>
<ExceptionType>System.ServiceModel.CommunicationException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.</Message>
<StackTrace>
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at OSI.Framework.ServiceContracts.IWCFObjectDirectorWebService.Fetch(Byte[] serializedObjectRequest)
at OSI.Framework.WCF.Director.WCFWebObjectDirectorProxy.Fetch(Byte[] serializedObjectRequest)
at OSI.Framework.WCF.Director.WCFWebObjectDirector.Fetch(Object criteria)
at ActvMonitorSystemBusiness.Views.ActvView.GetActvDetails(DateTime fromDate, DateTime thruDate, String userGrpCd, String userCatCd, String userMajorCd, String userStatusCd, Nullable`1 userMemberNbr, Nullable`1 subjNbr, String searchBy, String dispActivity, Boolean showUncategorizedActv, Object[] fetchOptions)
at ActvMonitorSystemScreen.frmActvMonitor.Populate(Object sender, EventArgs e)
at ActvMonitorSystemScreen.frmActvMonitor.InitializeExtension(Object sender, EventArgs e)
at OpenSolutions.Sys.DnaExtensions.Client.SecureCoreBaseForm.Initialize(Object sender, EventArgs e)
at OSI.Base.Windows.Forms.BaseForm.OnShown(EventArgs e)
at OSI.Core.Windows.Forms.CoreBaseForm.OnShown(EventArgs e)
at ActvMonitorSystemScreen.SecureCoreBaseFormShim.OnShown(EventArgs e)
at System.Windows.Forms.Form.CallShownEvent()
at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
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.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at OSI.Runtime.Program.Main(String[] args)
</StackTrace>
<ExceptionString>System.ServiceModel.CommunicationException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
--- End of inner exception stack trace ---</ExceptionString>
<InnerException>
<ExceptionType>System.Net.WebException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>The underlying connection was closed: A connection that was expected to be kept alive was closed by the server.</Message>
<StackTrace>
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
</StackTrace>
<ExceptionString>System.Net.WebException: The underlying connection was closed: A connection that was expected to be kept alive was closed by the server. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)</ExceptionString>
<InnerException>
<ExceptionType>System.IO.IOException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.</Message>
<StackTrace>
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
</StackTrace>
<ExceptionString>System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)</ExceptionString>
<InnerException>
<ExceptionType>System.Net.Sockets.SocketException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>An existing connection was forcibly closed by the remote host</Message>
<StackTrace>
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
</StackTrace>
<ExceptionString>System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)</ExceptionString>
<NativeErrorCode>2746</NativeErrorCode>
此服务适用于其他客户。只是这个客户端在处理超过 5 分钟的请求时遇到了问题。不同 Web 服务器上的其他客户端可以正常完成请求。
最佳答案
五分钟的限制听起来不像 default timeouts 中的任何一个
所以我查看了应用程序池的高级设置,寻找默认为 5 分钟且看起来可能有问题的设置。我找到了一对你可以试试。您可能想采用这种方法:
我突然想到的几个 5 分钟设置是CPU 下的限制间隔(分钟)和快速故障保护 下的故障间隔(分钟)。
不能保证会是这样,但除非您在某处手动将默认值设置为 5 分钟,否则这是开始寻找 5 分钟设置的合理位置。一次更改一个设置,重新启动应用程序池,然后进行测试。请注意,如果您在代码中遇到类似无限循环的问题,显然没有超时值会有所帮助:-(祝你好运。
关于c# - IIS Apppool 断开与 WCF 服务的连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50842005/
WCF 服务、WCF RIA 服务和 WCF 数据服务之间有什么区别? 最佳答案 WCF 是一般服务的通信基础设施。 WCF RIA 服务自动生成客户端和服务器代理对象以方便应用程序开发,并依赖 WC
我想在我的 WPF 项目中使用 WCF 服务 (.svc)。, 我正在尝试创建一个服务。但在 Visual Studio 中,我们有“WCF 服务库”和“WCF 服务应用程序”。我两个都试了。 当我们
我正在开发 WCF Web 服务,并使用 WCF 服务应用程序模板来执行此操作。 创建“WCF 服务应用程序”是否满足此要求?与 WCF 服务应用程序相比,创建 WCF 服务库有哪些优势? 最佳答案
我是 WCF 的新手,对 Web 服务进行编码的经验有限。 在工作中,所有面向网络服务的事物都被要求使用 WCF。我需要做的工作涉及查询一个非 WCF Web 服务,该服务显然是用 Java 构建的,
我有一个数据契约(Contract)说用户。它是可序列化的并且可以通过网络传输。我想要一个操作契约(Contract) SaveUser()。我可以将 SaveUser(User user) 作为运营
我一直在开发一个使用 WCF 访问服务器端逻辑和数据库的 WPF 应用程序。 我从一个 WCF 客户端代理对象开始,我反复使用它来调用服务器上的方法。使用代理一段时间后,服务器最终会抛出异常: Sys
不要添加关于不同 WCF 堆栈的另一篇 SO 帖子,但我想在浪费更多开发时间之前确保我朝着正确的方向前进...... 我的场景 - 我们公司有许多 Web 应用程序,它们都访问同一系列的数据库。所有应
我是WCF技术的新手,我想知道RESTful WCF服务和普通WCF服务有什么区别。 RESTful 服务相对于普通 WCF 服务有哪些优势? 谢谢。 最佳答案 REST服务基于HTTP协议(prot
我正在构建的应用程序公开了多个 WCF 服务(A、B)。在内部,它消耗了在我们的内部网络(X、Y)上运行的其他几个 WCF 服务。 使用 WCF 消息日志记录,我希望仅记录我们的服务 A、B 与调用它
我们需要从另一个 WCF 服务调用 WCF 服务。为了测试这一点,我构建了一个示例控制台应用程序来显示一个简单的字符串。设置是: 控制台应用程序 -> WCF 服务 1 -> WCF 服务 2 Con
假设永远不会直接查询数据的情况。 AKA,总会有一些必须发生的过滤逻辑和/或业务逻辑。 什么时候是在 ajax/js 之外使用数据服务的好理由? 请不要访问此页面 http://msdn.micros
我在尝试将所有常规 WCF 调用转换为异步 WCF 调用时遇到问题。我发现我重构了很多代码,但不确定具体该怎么做。我使用了我找到的方法 here但遇到了我需要事情按顺序发生的问题。 private v
我在 IIS 上有一个 WCF 服务,一些 .net Web 应用程序正在使用它。我的任务是编写一个新的 WCF 服务,要求现有的 Web 应用程序可以使用新服务而无需更改它们的 web.config
我正在尝试用外部提供 WSDL 的 WCF 等效服务替换 WSE 服务。 首先,我使用 svcutil 和 wsdl 生成所有服务和客户端类(ATP,我只关心服务实现。)我生成了一个空的 WCF 服务
场景是这样的:有2个WCF Web Services,一个是客户端(WCFClient),一个是服务端(WCFServer),部署在不同的机器上。我需要他们两个之间的证书通信。 在服务器 WCF 上,
我在 Visual Studio 2013 中创建一个 WCF 服务并将其发布到 IIS。我可以在另一个项目中添加服务引用并使用该服务的方法。当我转到 IIS 服务器管理器时,我看到 WCF 激活及其
我是 .net 的新手,对 WCF 知之甚少,如果有任何愚蠢的问题,请耐心等待。我想知道如果我的代码没有显式生成任何线程,WCF 如何处理 SELF-HOST 场景中的同时调用。因此,在阅读了很多关于
我正在为应用程序开发一个面向服务的体系结构,我希望这些服务既可以通过 WCF 公开,也可以通过一个简单的库使用。理想情况下,我想减少重复代码。 从概念上讲,这映射到: Client => WCF Se
我有一个小型测试网络服务来模拟我在现实世界应用程序中注意到的一些奇怪的东西。由于演示显示与应用程序相同的行为,为了简洁起见,我将使用演示。 简而言之,我的服务接口(interface)文件如下所示(您
我首先为我的 WCF 服务启动了我的订阅者,然后继续发布我的发布者的帖子。我的订阅者能够收到帖子。 其次,我关闭了我的第一个订阅者并再次打开它以订阅相同的服务,即所谓的已订阅该服务的第二个订阅者。再一
我是一名优秀的程序员,十分优秀!