question

naks-6708 avatar image
0 Votes"
naks-6708 asked naks-6708 commented

Webapp first time loads very slowly, like DNS resolution is slow

1st time you put in my web app URL, loading is slow. But once it loads, it runs fast.

Like my laptop connected to wifi, first time very slow.
At same time, phone on SIM netpack also loading slowly(animation of loading, no content).

Then once the site loaded on pc, immediately it loaded on mobile. Even though they have diff ISP.

I am hosting in US-EAST, accessing from India

Linux Web App (PHP 7)(US-EAST) <----> MySQL Flexible Server (US-EAST)


I have also enabled HTTPS only, this also improves web app speed, when clients connect to HTTPS only.

This is a project demo, so I am using the basic free tier web app.

azure-dnsazure-webapps-availability
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

sreejukg avatar image
0 Votes"
sreejukg answered naks-6708 commented

You need to check the Always on settings for you app.

By default, Azure Web Apps are unloaded if they are idle (No request for the app) for a set period of time (20 minutes). This way, the system can conserve resources. The unloaded app can cause high latency for new requests because of its warm-up time.

When Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

Refer: https://docs.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal#configure-general-settings

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That always on option cannot be changed in free tier. But, scaling up to next B1 tier makes the warm-up quite fast.

0 Votes 0 ·
naks-6708 avatar image
0 Votes"
naks-6708 answered naks-6708 edited

Also I was getting 502 & App service error, even when it was working okay since 28 Feb.

So I thought of upscaling it from Free to B1, now everything loads fast.

Like even if it was working, certain PHP webpages were taking time to load (even after warm up) & SCM Management also was not working (sitename.scm.azurewebsites.net).

Also investigating the logs I found that it was rebooted automatically at morning & noon. This happens only when Azure is doing maintainence, or server was malfunctioning...
So I thought def it looks like performance issues and upscaled it.

Its very simple thing with HTML CSS PHP & MySQL, idk why the free one was throwing errors even after restart.

Today only these problems started happening.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.