15秒后,WCF 4.0调用在WPF客户端上挂起 [英] WCF 4.0 calls hang on WPF client after 15 seconds

查看:103
本文介绍了15秒后,WCF 4.0调用在WPF客户端上挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WCF的新手,但我设法创建了一个使用GoDaddy托管在IIS中的工作服务。我有一个奇怪的问题,我没有在开发中遇到过。该服务的工作时间约为15秒。我可以在这个最初的15秒窗口内拨打几个电话到服务器并接收响应。 15秒后,客户端的呼叫将在默认的1分钟标记处超时,并显示通用超时错误。



我已跟踪服务器和客户端,似乎在最初的15秒后,客户端请求永远不会到达服务器。客户端的跟踪显示超时但它有些通用。服务器没有显示任何内容,只是最后一次成功通话。



我尝试了很多事情,比如调整超时,每次通话后关闭/处理,在BackgroundWorker线程中请求WCF服务,以及其他一些没有帮助的事情。注意我从定时器调用WCF请求函数。



在客户端跟踪中,有一件奇怪的事情似乎与每次失败有关。 线程ID更改。我不确定这意味着什么,但在前15秒内,请求被处理在说线程ID 9 ....在那15秒后,请求线程ID 12上的下一个失败的呼叫。我注意到这个线程ID 12不遵循与初始线程ID 9相同的跟踪模式,但我认为这是因为它不需要重新初始化,它只是使用不同的线程来发出请求?



客户端呼叫失败并在1分钟后超时后,另一个请求将会正常运行。它似乎也在一段时间后重置。

例如,

我可以进行1次初始通话,等待20秒,拨打另一个电话 - 该通话将失败。

我可以进行1次初始通话,等待5分钟,拨打另一个电话 - 该通话成功。



我正在使用basicHttpBinding。



这听起来对任何人都很熟悉,或者任何人都可以提供任何线索/帮助吗?过去一周我一直坚持这个问题而且我没有得到任何地方。任何帮助将非常感激。谢谢

I'm new to WCF but I've managed to create a working service that's hosted in IIS with GoDaddy. I'm having an odd problem that I didn't experience in development. The service works as it should for about 15 seconds. I can make several calls within this initial 15 second window to the server and receive responses. After 15 seconds, the client's call will timeout at the default 1 min mark with the generic timeout error.

I've traced both the Server and the Client and it seems the Clients request is never reaching the server after this initial 15 seconds. The Client's trace is showing the timeout but it's somewhat generic. The server doesn't show anything, just the last successful call.

I've tried a number of things like adjusting the timeouts, closing/disposing after each call, requesting the WCF service in a BackgroundWorker thread, and a few other things that didn't help. Note I do call the WCF request function from a Timer.

In the Clients trace, there is one odd thing that seems connected to every failure. The "Thread ID" changes. I'm not sure exactly what that means but within the first 15 seconds, requests are processed on say Thread ID 9.... after that 15 seconds the next failed call is requested on say Thread ID 12. I noticed this Thread ID 12 doesn't follow the same Trace pattern as the initial Thread ID 9, but I assume that's because it doesn't need to reinitialize itself, it's just using a different thread to make the request?

After the Client's call fails and times-out @ 1 minute, another request will go through fine. It also seems that its getting reset after a period of time as well.
For example,
I can make 1 initial call, wait 20 seconds, make another call- and that call will fail.
I can make 1 initial call, wait 5 minutes, make another call- and that call is successful.

I'm using basicHttpBinding.

Does this sound familiar to anyone or can anyone provide any clues/help? I've been stuck on this problem for the past week now and I'm not getting any where. Any help would be much appreciated. Thanks

推荐答案

结束了Godaddy托管问题。他们将我迁移到一台新的服务器,一切正常。



编辑
添加此链接以获得清晰的图片

(SOLVED)WCF 4.0服务挂起首次致电+ Godaddy举办的15秒 [ ^ ]
Ended up being a Godaddy hosting problem. They Migrated me to a new server and all worked fine.

EDIT
Adding this link for clear picture
(SOLVED) WCF 4.0 Service Hangs after First Call + 15 seconds Hosted on GoDaddy[^]


这篇关于15秒后,WCF 4.0调用在WPF客户端上挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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