0

Slowness in the first request sent to the IIS.

Scenario: When sending the first request to a website in IIS or sending a request after some downtime the response takes much longer than expected.

The following actions have been tried to resolve the issue.

  • Set Application Pool Start Mode property to AlwaysRunning
  • I compiled as DLLs with Ngen

I identified this problem with code .Net Framework 4.X and .Net Core greater than 2.x WCF and API.

The Chairman
  • 7,087
  • 2
  • 36
  • 44
  • 1
    There are tons of discussions in the past on IIS cold start slowness, like https://stackoverflow.com/questions/13386471/fixing-slow-initial-load-for-iis – Lex Li Jan 06 '22 at 14:44

1 Answers1

0

Some tips:

  • In IIS Manager, right click on the website, choose "Manage Website" > "Advanced Settings...", make sure that Preload enabled is set to True (the default is False).
  • In IIS Manager, right click on the application pool, choose "Recycling...", make sure that all options are unticked. The default is to always recycle after 1740 minutes (29 hours). See here for more info.
Peter B
  • 22,460
  • 5
  • 32
  • 69