闲置一段时间后,Web应用程序性能降低 [英] web app slow performance when leave idle for some time

查看:112
本文介绍了闲置一段时间后,Web应用程序性能降低的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在IIS 7.5目标框架4.0上部署了一个Web应用程序 第一次闲置几分钟后,应用程序执行速度很慢,然后在每次空闲时都按预期执行此操作. 在小提琴手的帮助下,我发现它的TCP/IP连接大约需要21秒,而在随后的调用中,这个时间是0. 在IIS设置中,空闲超时"也设置为较高,而连接超时"也设置为较高. 服务器是-Windows 2008 R2. 与网站相关的事件查看器中没有任何内容. 我们使用了表单身份验证,但配置文件中的超时时间也设置为大约10个小时.

We have a web application deployed on IIS 7.5 target framework 4.0 the application perform slow when leave idle for few minutes for first time and then perform as expected this happened each time application is idle. With the help of fiddler I found its TCP/IP connection which is taking time about 21 secs whilein subsequent calls this time is 0. The Idle time out is also set high and connection time out is also high in the IIS settings. server is - Windows 2008 R2. there is nothing in the event viewer related to the website. we used form authentication but the time out for that is also set about 10 hours in the config file.

在应用闲置一段时间后,有人能指出我的设置会影响响应时间吗? 注意-与LAN一起部署时,此方法工作正常,但在LAN外部或单独的域中部署时,此问题开始.

Can anybody point me to the setting with is affecting the response time after the app is idle for some time. Note - this was working proper when deployed withing the LAN but this problem starts when deployed out of the LAN or in separate domain.

推荐答案

  1. 问题

这是IIS应用程序池空闲超时的问题,默认情况下设置为20分钟,如果20分钟内没有请求,则应用程序池关闭20分钟后, 20分钟后,如果有任何请求再次开始, 问题在于,第一次访问应用程序池需要创建一个新的w3wp.exe工作进程,这很慢,因为需要创建应用程序池,需要加载ASP.NET或其他框架,然后您的应用程序需要被加载.因此可能需要20到30秒的时间或取决于应用程序内容的大小.

here is the problem in IIS app pool idle time out, its by default set to 20 minutes, after 20 minutes app pool shutdown if no request within 20 minutes, when any request comes after 20 minute its again start, The problem is that the first visit to an app pool needs to create a new w3wp.exe worker process which is slow because the app pool needs to be created, ASP.NET or another framework needs to be loaded, and then your application needs to be loaded. so it may take time 20-30 seconds or depends on the application content size.

  1. 解决方案

因此,为了避免此类延迟,我们需要将空闲超时设置为0. 现在它将始终快速加载.

so to avoid this type of delay we need to set the idle time out to 0. now it will always load fast.

  1. 应用程序池设置

这篇关于闲置一段时间后,Web应用程序性能降低的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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