question

GauravKumar-2427 avatar image
0 Votes"
GauravKumar-2427 asked TakahitoIwasa commented

Pages are slow on the first time loading : Azure App Service

Hello Everyone,

Good Morning

I am running a Asp.Net MVC web application hosted in Azure Environment. In Azure environment I am using ServicePlanCP (S3: 2)


Actually I am facing slowness on first load of the pages of application but the subsequent page load is working fine most of the time.


I have also noticed that the CPU usage reaches as high as 99% and subsequent page load for the same pages also slows down.

I also set "Always on" in Configuration>General Setting of the App service setting (Prevents your app from being idled out due to inactivity.)

Kindly suggest what should I also care about? Or is there any other thing I am missing?

Thank You

azure-webapps
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.

1 Answer

TakahitoIwasa avatar image
0 Votes"
TakahitoIwasa answered TakahitoIwasa commented

Hello.

Is the ASP.NET preload feature enabled? You may be able to fix the problem that the first load is slow, so please try it.

Please refer to the following page. (I'm sorry for the Japanese reference page. Please translate it.))
https://poke-dev.hatenablog.com/entry/2019/08/08/000810

· 2
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.

Thanks takahitolwasa for replying.

Yes I tries to apply this solution but when I edit pipe line and run it again it shows error the the point of building solution and the error as below.

[error]C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\95c96072\3ba13295\App_Web_qps0ttmh.1.cs(32,0): Error CS0234: The type or namespace name 'NewRequestModel' does not exist in the namespace 'CP.Models' (are you missing an assembly reference?

I tried to find out that is there any NewRequestModel associated with my solution, bit unfortunately I don't have any model named like this.

Thanks

0 Votes 0 ·

To isolate the problem, I recommend that you first deploy and try it directly in Visual Studio without using a pipeline.

Try deploying first with the following two options.

https://cdn-ak.f.st-hatena.com/images/fotolife/p/poke_dev/20190806/20190806225404.png

https://cdn-ak.f.st-hatena.com/images/fotolife/p/poke_dev/20191023/20191023205312.png

0 Votes 0 ·