WCF服务:状态200,sc-win32-status为64 [英] WCF Service: Status 200 with sc-win32-status of 64

查看:533
本文介绍了WCF服务:状态200,sc-win32-status为64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在IIS 6.0上托管WCF服务的其中一台服务器上发现了以下行为:

We observed the following behavior on one of the servers hosting a WCF service on IIS 6.0:


  1. IIS日志显示高值for time-taken(> 100000)

  2. HTTP状态代码为200

  3. sc-win32-status代码显示值为64

我发现 sc-win32-status代码为64 表示指定的网络不再可用

I found out that sc-win32-status code of 64 indicates "The specified network is no longer available"

最初我怀疑它可能是因为限制 MinFileBytesPerSecond ,设置HTTP.sys在将数据从客户端发送到服务器以及从服务器返回到客户端时强制执行的最小吞吐率。
但是sc-bytes和cs-bytes的值表示发送的数据量在服务通常观察的范围内。

Initially I suspected that it could be because of limits set on MinFileBytesPerSecond, which sets the minimum throughput rate that HTTP.sys enforces when sending data from the client to the server, and back from the server to the client. But the value for sc-bytes and cs-bytes indicate that the amount of data is sent is within the range generally observed for the service.


另请注意,WCF服务托管在四个框上并且是负载平衡的,但问题只发生在其中一个服务器上。 (但基本上不在同一台服务器上)。问题也是断断续续的。

Also note that the WCF service is hosted on four boxes and is load-balanced, but the problem occurs only one of the servers. (but not essentially on the same server). The problem is also intermittent.

还有其他人遇到此错误吗?关于什么可能出错的任何线索?

Has anybody else encountered this error? Any clues about what could be wrong?

更新



注意:观察IIS 7.5(IIS版本并不重要)



我能够复制该问题。如果出现以下问题:


1. WCF服务需要很长时间才能响应

2.客户端代理在收到服务器响应之前超时。在这种情况下,它会导致客户端上的TimeoutException。

3.服务器一直在等待客户端的TCP ACK,它永远不会收到。



因此长超时(TCP套接字超时(默认值:4分钟)和sc-win32-status为64

Update

Note: Observation on IIS 7.5 (IIS version does not really matter)

I was able to replicate the issue. The issue occurs if:

1. The WCF service takes a long time to respond
2. The client proxy times out before it receives a response from the server. In this case it leads to TimeoutException on the client.
3. The server keeps waiting for TCP ACK for the client, which it would never receive.

Hence a long timeout (TCP socket timeout (default value: 4 minutes) and sc-win32-status of 64

所以基本上看起来WCF代码需要很长时间才能响应并且客户端超时,我在IIS日志中观察到的只是一个症状而不是问题。

So essentially it appears that WCF code is taking a long time to respond and the client is timing out, what I observe in IIS log is just a symptom and not a problem.

推荐答案

如果超过WCF服务的最大会话数,也会出现您所描述的行为,调用或实例(取决于您如何配置服务instancecontext模式)。如果您观察到%max并发会话和/或%max并发调用的System.ServiceModel性能计数器(同样取决于您的服务的实例上下文),您可以查看与IIS日志条目的相关性。

The behavior you are describing will also occur if you exceed a WCF service's max sessions, calls or instances (depending on how you have your service instancecontext mode configured). If you observe the System.ServiceModel performance counters for %max concurrent sessions and/or %max concurrent calls (again depending on your service's instance context), you may see a correlation with the IIS log entries.

请注意,可以在服务限制行为中配置这些最大值。

Note that these maxes can be configured in the service throttling behavior.

https://msdn.microsoft.com/en-us/library/vstudio/system.servicemodel.description.servicethrottlingbehavior(v = vs.100) .aspx

这篇关于WCF服务:状态200,sc-win32-status为64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆