IIS工作线程问题
我的网站托管在 IIS 托管上。站点具有需要调用WCF服务然后返回结果的功能。问题是该网站正在处理对 WCF 服务的调用,而另一个网站调用则冻结并且无法快速返回内容(这只是静态内容)。我使用不同的imacros脚本设置了两个chrome实例,其中一个正在调用请求wcf服务的页面,另一个页面只是静态内容。所以在这里我可以看到,当请求 wcf 服务的第一个页面冻结时,另一个页面也会冻结,并且当第一个页面被释放时,第二个页面也会冻结。
我是否需要在 Web.Config 中重新配置某些内容,或者是否应该执行其他操作才能立即获取静态内容。
I have my site hosted on IIS hosting. Site has feature that needs calling WCF service and then return result. The issue is that site is processing calling to WCF service another web site calling is freezing and not return content fast (this is just static content). I setup two chrome instances with different imacros' scripts, which one is calling page that requests wcf service and another one page is just static content. So here I can just see that when first page that requests wcf services freezes, another one page also freezes and when first is released the second is too.
Do I need reconfigure something in my Web.Config or do should I do something else to get possible to get static content immediately.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我认为这里有两个独立的问题:
在调用WCF服务的页面上一个常见的问题是WCF客户端没有关闭。默认情况下有 10 个 WCF 连接,超时为 1 分钟。前 10 个调用运行良好(假设它们执行了 2 秒),然后第 11 个调用到来,没有空闲的 wcf 连接,因此必须等待 58 秒连接超时并变得可用。
关于静态页面冻结的原因。可能是您的客户端只允许与该站点的一个连接,直到对 wcf 服务的页面请求完成后才会发送对静态页面的请求。
您应该检查 IIS 日志以了解 IIS 报告请求正在执行的时间。
I think that there are two seperate problems here:
On the page that calls the WCF service a common problem is that the WCF client is not closed. By default there are 10 WCF connections with a timeout of 1 min. The first 10 calls go fine (say they execute i 2 secs), then the 11th call comes, there are no free wcf connections it must therefore wait 58 secs for a connection to timeout and become available.
On why your static page freezes. It could be that your client only allows one connection to the site, the request for the static page is not sent untill the request for the page with the wcf services is complete.
You should check the IIS logs to see how must time IIS is reporting that the request is taking.
我想说这是一个线程问题。此 MSDN 知识库文章提供了一些有关如何调整 ASP.NET 线程行为的建议:
http://support.microsoft .com/kb/821268
来自文章 - ...您可以调整 Machine.config 文件中的以下参数以最适合您的情况:
要成功解决这些问题,请执行以下操作:
ETC...
I would say that this is a threading issue. This MSDN KB article has some suggestions on how to tune your ASP.NET threading behavior:
http://support.microsoft.com/kb/821268
From article - ...you can tune the following parameters in your Machine.config file to best fit your situation:
To successfully resolve these problems, do the following:
etc...
考虑这样的场景:当您向 IIS 发出请求时,您的应用程序会更改、删除或创建 App_Data 文件夹之外的某些文件。这通常是一个日志文件,被错误地放置在应用程序的 bin 文件夹中。文件系统更改导致 IIS 重新加载 AppDomain,因为它认为应用程序已更改,因此会出现延迟。这可能适用于您的问题,也可能不适用于您的问题,但这是 ASP.NET 应用程序中的常见错误。
Consider such scenario: when you make a request to IIS your app changes, deletes or creates some file outside of App_Data folder. This often tends to be a log file which is mistakenly was put at bin folder of the app. The file system changes lead to AppDomain reloading by IIS as it thinks that app was changed, hence the experienced delay. This may or may not apply to your issue, but it is a common mistake in ASP.NET apps.
嗯,也许没有问题...
可能只是浏览器的同域同时请求数限制。
在浏览器未完成对第一页(WCF 页面)的请求之前,它不会向第二页(静态)发送请求。
试试这个:
每个页面使用不同的浏览器(例如 chrome/firefox)。
或者在隐身窗口中打开 Chrome 中的第二页 (Ctrl + Shift + N)。
或者尝试从不同的计算机访问每个页面。
Well, maybe there is no problem...
It may be just the browser's same domain simultaneous requests limit.
Until the browser not finished the request to the first page (the WCF page), it won't send the request to the second page (the static).
Try this:
Use different browsers for each page (for example chrome/firefox).
Or open the second page in chrome in incognito window (Ctrl + Shift + N).
Or try to access each page from different computer.
您可以尝试使用 AppFabric 并查看您的 WCF 服务有什么问题http://msdn。 microsoft.com/en-us/windowsserver/ee695849
You could try to use AppFabric and see what is wrong with your WCF services http://msdn.microsoft.com/en-us/windowsserver/ee695849