线上web程序运行一段时间后会频繁抛出如下异常,回收iis应用池则正常。过段时间继续出现此异常,回收后则正常,然后如此循环。异常信息如下 :
An error occurred while making the HTTP request to https://xxx.cn/Services/Service.svc. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by a mismatch of the security binding between the client and the server.
通过wcf trace,得到异常日志,分析得到message为An existing connection was forcibly closed by the remote host.
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
服务通过https通信 ,请教该如何排查问题所在?
先排查这个问题:This could also be caused by a mismatch of the security binding between the client and the server
这种情况估计是服务端有资源泄露等问题,可以看看windows的日志查看器有无信息
windows日志记录中无相关信息
看了下,服务器中内存为free的项值为0
后来看了下服务器, https://xxx.cn/Services/Service.svc 这个服务连接数超过40个,且一直未释放
重新部署一个新的服务实例连接解决此问题