简体   繁体   English

IIS6,ASP.NET MVC 1和随机减速

[英]IIS6, ASP.NET MVC 1 and random slowdowns

I've recently deployed a MVC application to an IIS6 web server. 我最近将一个MVC应用程序部署到IIS6 Web服务器。 One strange behaviour I've been having is the load times will randomly blow up to 30sec+ and then return to normal. 我一直有一个奇怪的行为是加载时间会随机爆发30秒+然后恢复正常。 Our tests have shown this occurring on multiple connections at the same time. 我们的测试表明,这种情况同时发生在多个连接上。 Once the wait has passed, the site become responsive again. 一旦等待过了,网站就会再次响应。 It's completely random when this will occur, but will probably happen about once every 15 minutes or so. 当这种情况发生时,它是完全随机的,但可能每15分钟左右发生一次。

My first thought was the application was being restarted by the web server for some reason, but I determined this wasn't the case because the process recycling is set very infrequently, and I placed some logging in the application startup. 我的第一个想法是由于某种原因,Web服务器正在重新启动应用程序,但我确定情况并非如此,因为进程回收很少设置,我在应用程序启动时放置了一些日志记录。

It's also nothing to do with the database connection. 它也与数据库连接无关。 This slowdown happens simply by moving between static pages too. 仅通过在静态页面之间移动也可以实现这种减速。 I've watched the database with a SQL profiler, and nothing is hitting it when these slowdowns occur. 我用SQL分析器观察了数据库,当这些减速发生时没有任何东西在击中它。

Finally, I've placed entry and exit logging on my controller actions, the slowdown always happens outside of the controller. 最后,我在我的控制器动作上放置了进入和退出记录,减速总是发生在控制器之外。 The entry and exit time for a controller action is always appropriately fast. 控制器操作的进入和退出时间总是适当快。

Does anyone have any ideas of what could be causing this? 有没有人有什么可能导致这个的想法? I've tried running it locally on IIS7 and I haven't had the issue. 我试过在IIS7上本地运行它,我没有遇到问题。 I can only think it's something to do with our hosting provider. 我只能认为这与我们的托管服务提供商有关。

Is this running on a deadicated server? 这是在一个死区服务器上运行吗? if not it might be your hosting providor. 如果不是它可能是你的托管提供者。

It sounds to me from what you have said that the server every 15 mins is maxing its CPU for some reason. 从你所说的内容来看,服务器每隔15分钟因某种原因最大化CPU。 It could be something in code hitting a infinate loop, have you had a look in the event log for any crashes / error from the application. 它可能是代码命中一个无限循环的东西,你有没有在事件日志中查看应用程序的任何崩溃/错误。

Run the web app under a profiler (eg JetBrains) and dump out the results after one of these 30 seconds lockups occur. 在分析器(例如JetBrains)下运行Web应用程序,并在发生这些30秒锁定之一后转储结果。 The profiler output should make locating the bottleneck fairly obvious as it will pinpoint the exact API call which is consuming the time/blocking other threads. 分析器输出应该使瓶颈定位相当明显,因为它将精确定位正在消耗时间/阻塞其他线程的API调用。

At a guess it could be memory pressure causing items being dumped from cache or garbage collection, although 30 seconds sounds a little excessive for this. 在猜测它可能是内存压力导致项目从缓存或垃圾收集转储,虽然30秒听起来有点过分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM