Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Why is the IIS page so slow to open for the first time every day?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

There is a problem today. Our web page is always slow to open in the morning, and sometimes slow at other times. At first, it was considered to be a problem of server performance. After monitoring the use of server resources, it was found that the resources of the server were not running at a high level, and it could be determined that it was not the problem of server hardware performance. Later, after checking the log, it was found that IIS regularly recycled the application pool. The default is that the application pool is idle (no requests, no operations) and then shuts down the process of the application pool after 20 minutes to release resources. In this way, if there is another request from the client, then start the program and set up the process, which is bound to be delayed. After understanding this setting, combined with the characteristics of the site, I extended the 20-minute setting. I set it to 0, which means no shutdown (the server has only two websites, sufficient resources, and limited daily visits). This setting is modified in the application pool advanced settings.

Worried about the problem of not emptying the IIS cache for a long time, I set up the application pool to reclaim resources at 4 o'clock every night, and right-click in the application pool to modify it.

This solves the problem of slow opening during the day, but it is slower for the first person in the morning to open the web page. In order to open the web page faster, write a script and add it to the scheduled task to run one hour before going to work every day to activate the application pool. The script is as follows: http://www.iis7.com/b/ssyqdq/

Start/bc:\ iexplore.ext.lnk http://127.0.0.1/: opens the web page in the background

Ping127.0.0.1-n100: wait 100 seconds

Taskkillimiexplore.exe: kill the browser process.

Because I am a 2008 system, if I am a 2012 system, I can activate the application pool directly with powershell's invoke-webrequest http://127.0.0.1 command, omitting the steps of using the browser.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report