locked
ASP .Net MVC app is super slow when hosted as App Service RRS feed

  • Question

  • I have an ASP .Net MVC web app hosted in an Azure App Service with S3 tier, and connecting to an Azure SQL db with 50 DTU.

    There is literally no traffic on that site except for me testing. The CPU usage on the App Service is never above 50% (even with just 1 user) and the SQL DTU's never go above 10%.

    Despite all this, this web app which loads in 1-2 seconds when hosted on a VM, now takes about 30 seconds to load on average, and sometimes double that. This is true for any page I click.

    I plugged in App Insights and I still have no idea where the slowdown is occurring. The Performance blade says the SQL dependencies are slow, but when I drill down into them, it says the SQL calls complete in 10 ms or less.

    So how can I figure out what the heck is going on? I need to find where the slowdown is and App Insights profiler feature hasn't been helpful so far.

    As you can see below, it says the top dependency is SQL and that the avg time taken was 20sec, but when I click on the details, it shows a time taken of 182ms.


    • Edited by noamo48 Monday, April 16, 2018 11:19 PM
    Monday, April 16, 2018 11:18 PM

Answers

  • I figured out I had it pointing to a Redis Cache instance in a different region. Once I updated it to use a Redis instance in the same region, speed improved dramatically!
    Tuesday, April 17, 2018 3:16 PM

All replies