因此,我有一个.NET web服务正在运行,当我在本地调试并在我的机器上本地运行该服务时,请求将占用~4。然而,当我将项目推送到我的web服务器时,相同的请求现在需要100万左右。我觉得这个请求应该只需要5秒。我不知道我做错了什么。
这是我的小提琴手的结果:
服务器性能:
ACTUAL PERFORMANCE
--------------
ClientConnected: 11:21:33.443
ClientBeginRequest: 11:21:42.412
ClientDoneRequest: 11:21:42.412
Gateway Determination: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 0ms
HTTPS Handshake: 0ms
ServerConnected: 11:21:13.506
FiddlerBeginRequest: 11:21:42.412
ServerGotRequest: 11:21:42.412
ServerBeginResponse: 11:22:47.085
ServerDoneResponse: 11:22:47.101
ClientBeginResponse: 11:22:47.101
ClientDoneResponse: 11:22:47.101~ 1m05s
当地表演:
ACTUAL PERFORMANCE
--------------
ClientConnected: 11:35:50.111
ClientBeginRequest: 11:35:59.533
ClientDoneRequest: 11:35:59.533
Gateway Determination: 0ms
DNS Lookup: 0ms
TCP/IP Connect: 0ms
HTTPS Handshake: 0ms
ServerConnected: 11:35:48.845
FiddlerBeginRequest: 11:35:59.533
ServerGotRequest: 11:35:59.533
ServerBeginResponse: 11:36:03.283
ServerDoneResponse: 11:36:03.298
ClientBeginResponse: 11:36:03.298
ClientDoneResponse: 11:36:03.298 ~4s
这是IIS问题吗?web服务正在调用ClearQuest API,但是当我直接在web服务器上运行时,提出ClearQuest请求没有问题,因此我排除了瓶颈的可能性。
真的被困在这里了。感谢你的帮助。
编辑1:我追踪到了主要滞后到这里:
System.Web.Services.Asmx Information: 0 : Return from IHttpHandler.ProcessRequest
Caller: System.Web.Services.Protocols.SyncSessionlessHandler#19197163::ProcessRequest()
ProcessId=4740
LogicalOperationStack=
ThreadId=5
DateTime=2011-12-19T21:21:36.2218996Z
Timestamp=58279486569830475
System.Web.Services.Asmx Information: 0 : Calling IHttpHandlerFactory.GetHandler
Caller: System.Web.Services.Protocols.WebServiceHandlerFactory#50757320::GetHandler()
Request Host Address: 192.168.5.15
Request Host Name: itdotnet.kns.com
Request Url: [POST] http://myurl.com/websvc/CQAccess.asmx
ProcessId=5348
LogicalOperationStack=
ThreadId=6
DateTime=2011-12-19T21:22:25.7834480Z
Timestamp=58279635279292073注意,时间戳大约是49s。
发布于 2012-01-11 17:22:55
当我遇到这样的问题时,这是由于服务器在执行自动证书吊销检查时引起的超时。如果您正在使用一个或多个签名(或自签名)程序集,或者是通过SSL将服务绑定到自签名证书,或者可能是代理后面的服务器,或者没有internet访问,则这可能发生在您的服务器环境中。
这个博客很好地记录了这个问题:
http://blogs.msdn.com/b/andreal/archive/2008/07/19/wcf-service-startup-too-slow-have-you-thought-to-crl-check.aspx
在我的例子中,最好的方法是切换到具有可信第三方签名证书的生产服务器。在其他环境中,我不得不禁用证书吊销,并隐式信任发行者证书和所有服务端点的服务器证书。
如果以上所述无法回答您的问题,那么本文可能提供一些其他资源来研究:
http://www.codeproject.com/Tips/114132/WCF-First-Call-Slow
https://stackoverflow.com/questions/8567589
复制相似问题