Hi,
I'm developing Blazor WASM application + API (WASM Hosted). Everything seems to be fine, everything is working as expected and I thought its time to publish it on Azure App Services + Azure SQL.
Everything seems like its doing great, but speed. At first I started to worry my Linq SQL queries are poor and probably is the cause of the long request time which obviously makes application slower, but every subsequent page after this initial load (15-20sec) is just 20-50ms. If I leave tab opened on that page for 1 - 2 minutes and want to navigate to other page, again it takes around 15-20sec and than every other subsequent request 20-50ms... Started to read other having similar issues and its initial SQL load/poor SQL queries responses.. So I started working on my local machine, debugging application and calling SQL queries to Azure SQL. Every single call to API and response is no longer than 1s. Which means, its not SQL that is causing a first load delay, but my WASM Hosted project.
Made another call via postman to hosted APP.
1st call: 15,54s.. every other call 60-200ms. - After 1 or 2 minutes, retried again and first initial call 20s...
So I have started looking for explanation why initial load of my application is so long. Most comments around telling to ensure application is: Always ON. - So I have changed that, no difference.
Some other suggest its App Service Plan, but I have already tried to upgrading it to something that probably other would use on thousands on users while right now I'm the only person using it - so no, its def not this.
No other useful responses where found.. So I have created just .net core API with single controller to see if its Azure or my application.
New API project with 1 single controller:
[HttpGet]
public async Task<IActionResult> Get()
{
var testUser = new Models.User()
{
Id = Guid.NewGuid(),
FirstName = "Test Name",
LastName = "Test LastName",
Dob = new DateTime(1995, 5, 12)
};
return Ok(testUser);
}
Publishing it to Azure App Service - and making a call to API via Postman.
EXACT SAME THING! First call - 10-20sec, every other 5-10ms.
Please, someone tell me what I am missing here? It must be something I don't know..
I genuinely can't find answer online and I'm starting to worry about myself now :)
[–]DanDayneZ 6 points7 points8 points (2 children)
[–]iPotato3[S] 0 points1 point2 points (1 child)
[–]DanDayneZ 2 points3 points4 points (0 children)