WCF Callback Service with netTcp Binding timeout after 10 mins

后端 未结 2 967
野的像风
野的像风 2021-01-19 02:19

I\'m creating a chat application with WCF(using callback contract) and netTcpBinding. I\'m hosting the service as a windows service and accessing it from other computers v

相关标签:
2条回答
  • 2021-01-19 02:52

    The timeout in this case is defined by both receiveTimeout in the binding and inactivityTimeout in reliable session which is used for duplex messaging. The correct solution is not increasing timeout but implementing some ping / keep alive messages. The reason is that increasing timeout will keep connections open for failed clients.

    0 讨论(0)
  • 2021-01-19 02:52

    Can you post client call sample (service call example). What might happening here is that you are not closing client correctly and you reach maximum sessions on service side.
    You must be aware that using net.tcp binding is different than http.

    You can use System.ServiceModel performance counters (http://msdn.microsoft.com/en-us/library/ms750527.aspx) and see after 10 minutes what is happening (number of calls outstanding, number of service instances, etc..)

    http://dkochnev.blogspot.com/2011/06/wcf-framework-40-monitoring-service.html

    0 讨论(0)
提交回复
热议问题