12

Hello I have recently deployed one of my application on azure portal and it is running fine as well but the issue it takes 15 SECONDS TO LOAD for the first time when site load.

After site load successfully once than it runs fine but as I open after some interval time of 10 min or 20 min again it takes 15 SECONDS TO LOAD.

I have read all the documents and applied the same below.

Performance tips

Traffic Manager Routine

Azure Advisor

Application Insights

Azure Site Performance

SOF Question

Azure Resource Health

Scheduler

I have set Scheduler to call my application on 10 minutes of interval time but it is having the same issue as it was.

The one issue I found is that, it is taking time to locate the server and than give the response so is there any routing mechanism I can provide in azure to locate the server faster? or anything else.

3 rules
  • 1,359
  • 3
  • 26
  • 54

2 Answers2

6

Did you turn On the Always On knob in Application Settings? —

https://learn.microsoft.com/en-us/azure/app-service/web-sites-configure#general-settings

Always On

By default, web apps are unloaded if they are idle for some period of time. This lets the system conserve resources. In Basic or Standard mode, you can enable Always On to keep the app loaded all the time. If your app runs continuous WebJobs or runs WebJobs triggered using a CRON expression, you should enable Always On, or the web jobs may not run reliably.

Community
  • 1
  • 1
evilSnobu
  • 24,582
  • 8
  • 41
  • 71
  • Yes I have already done this as defined in the articles I have posted in my question. – 3 rules Jul 18 '18 at 07:33
  • Collect a .NET profile with Application Insights from the Performance blade. That's going to tell you **what** takes forever to load. Assuming ASP.NET here. Also make sure your `/` route actually warms up the app, since that's what Always On does (a `GET /` request). – evilSnobu Jul 18 '18 at 07:35
  • What does this mean - _*it is taking time to locate the server and than give the response so is there any routing mechanism I can provide in azure to locate the server faster*_. Slow DNS resolution? That's a local problem not a cloud problem. – evilSnobu Jul 18 '18 at 07:37
  • I have done this as well and it takes 1.5 sec to load the page in result but actually I have to wait at least 15 to 20 sec to load the page. – 3 rules Jul 18 '18 at 08:15
  • @eviSnobu if site has not opened for a while and I try to open the site then at the bottom of the browser, it keeps showing "Waiting for " for at least 10-15 seconds. Once the site is located then site opens immediately afterward in couple of seconds time. – 3 rules Jul 18 '18 at 08:19
  • I'm also seeing the same problem. Any resolution that worked for you @3rules – user2185592 Aug 16 '18 at 05:05
  • @user2185592 Still looking for the solution. – 3 rules Aug 16 '18 at 05:05
  • We are still looking too – spadelives Mar 29 '19 at 18:24
  • 1
    I wanted to turn on Always On to solve this problem but it's dimmed out because I am still on the free plan. I just found through the article above and skimming through the settings I had my appservice set to .Net Full Framework but I am hosting .Net Core there. I changed it to .Net Core and it seems to be loading in 4 to 5 seconds the first time instead of 10+ second. I hope that holds up. I publish straight from visual studio for my little site and I always wondered what it meant by no matching framework (or to that affect). I think I just fixed:) – Sam Aug 23 '20 at 22:42
0

Check the Application Insight configuration in your App Service slot , if you have this activated, it may be affecting the TTFB time (Time to first byte)

It can be an diagnostics listener configured in your Web.config: https://varioustech.co.uk/?p=20

In case you have the XDT_MicrosoftApplicationInsights_Mode configuration key, simply change the configuration from recommended to default