NetNamedPipe: varying response time when communication is idling

跟風遠走 提交于 2019-12-12 20:17:16

问题


I have two WCF apps communicating one-way over named pipes. All is nice, except for one thing: Normally, the request/response cycle takes zero (marginal) time. However, if there was a time span of, say, half a minute without any communication, the request/response increases up to ~300-500ms.

I looked around the net and I got the idea of using a heart beat/ping mechanism to keep the communication channel busy. Using trial and error I found that when doing a request each 10 seconds, the response times stay low. Starting at around 15s intervals, the "hiccup" response times begin to appear.

Now I'm wondering where this phenomenon is originating from. I tried setting alle conceivable timeouts on both sides to > 1 minute, but that did not help.

Can anybody explain what's going on there?


回答1:


Check out Wenlong Dong's blog post, Why Does WCF Become Slow After Being Idle For 15 Seconds?

The post also includes a workaround until it gets fixed.




回答2:


Is it possible that the idling process is being paged to disk? If you keep the processes at both ends busy, but don't make the connection busy, does it still happen?

That may well not be it, but it's possibly worth a try.



来源:https://stackoverflow.com/questions/765938/netnamedpipe-varying-response-time-when-communication-is-idling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!