WCF timeout exception detailed investigation

后端 未结 11 1281
失恋的感觉
失恋的感觉 2020-11-29 16:44

We have an application that has a WCF service (*.svc) running on IIS7 and various clients querying the service. The server is running Win 2008 Server. The clients are runnin

11条回答
  •  北海茫月
    2020-11-29 17:07

    If you havn't tried it already - encapsulate your Server-side WCF Operations in try/finally blocks, and add logging to ensure they are actually returning.

    If those show that the Operations are completing, then my next step would be to go to a lower level, and look at the actual transport layer.

    Wireshark or another similar packet capturing tool can be quite helpful at this point. I'm assuming this is running over HTTP on standard port 80.

    Run Wireshark on the client. In the Options when you start the capture, set the capture filter to tcp http and host service.example.com - this will reduce the amount of irrelevant traffic.

    If you can, modify your client to notify you the exact start time of the call, and the time when the timeout occurred. Or just monitor it closely.

    When you get an error, then you can trawl through the Wireshark logs to find the start of the call. Right click on the first packet that has your client calling out on it (Should be something like GET /service.svc or POST /service.svc) and select Follow TCP Stream.

    Wireshark will decode the entire HTTP Conversation, so you can ensure that WCF is actually sending back responses.

提交回复
热议问题