Azure websites load takes very long time
Asked Answered
W

2

13

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.

Wolfram answered 18/7, 2018 at 7:18 Comment(3)
Which tier is it running on?Landrum
First load issue is most likely IIS load time, which can be made faster by using Deployment Slots + Application Initialization (set up warm-up routes in web.config).Landrum
@Landrum My application is running on (Basic: 1 Small) tier.Wolfram
S
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.

Shied answered 18/7, 2018 at 7:31 Comment(9)
Yes I have already done this as defined in the articles I have posted in my question.Wolfram
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).Shied
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.Shied
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.Wolfram
@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 <sitename>" for at least 10-15 seconds. Once the site is located then site opens immediately afterward in couple of seconds time.Wolfram
I'm also seeing the same problem. Any resolution that worked for you @3rulesAdalbert
@Adalbert Still looking for the solution.Wolfram
We are still looking tooOney
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:)Holzman
A
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

Appeal answered 28/9, 2021 at 17:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.