Authentication forms / profiles slow down on Azure Cloud, small locally

I am using MVC 4 on Azure and it loads very slowly (minute). Here is the loading time of several pages: http://i.imgur.com/V4brS.png (6.9 minutes was when I tried to load 7 tabs with different pages)

This problem does not occur when I use the Azure emulator locally.

I tried using an extra instance and using Remote Desktop to run the site locally, and it was just as slow. I also tried using IIS Express and regular IIS, and there was nothing there.

I created a completely new MVC project using the "Internet Application" template, which includes security, and it is very slow, so I am sure that the other things that I use in my project do not cause problems. Here is the load times only with the default MVC project: enter image description here

I initially used separate affinity areas for my membership database and my website, but I tried to use the corresponding affinity groups both on the empty form-validated MVC template and with my project.

Repeated page does not significantly improve their speed.

I also tried to create only an MVC site without authentication, with a 10x5000 table created:

<html> <body> <table> <thead> <tr> @for (int i = 0; i < 10; i++) { <th>@i </th> } </tr> </thead> <tbody> @for(int i = 0; i < 5000; i++) { <tr> @for(int j = 0; j < 10; j++) { <td>Row @i , column @j</td> } </tr> } </tbody> </table> </body> </html> 

This loads normally, both locally and in the cloud. Even with a cold start, it is only ~ 10-15 seconds.

So, I'm sure the problem is with the ASP.NET profile / membership / authentication, but only when deploying it to Azure (since I use the same Azure SQL database with Universal Providers when running locally, and there is no such slowdown).

I expected this problem to become more common, but the only thing that really seemed appropriate was the following: social.msdn.microsoft.com/Forums/en-US/windowsazuremanagement/thread/7d3323d8-571b-4b8f-9fdb-bd5ccc6c39b7 ( maybe this is: https://stackoverflow.com/a/4646263

I am working to try, as suggested in this thread, at windowsazure.com/en-us/manage/windows/best-practices/

+4
source share
1 answer

Did you verify that you checked "Allow other Windows Azure services to access this server" in the firewall rules for the database server?

I wonder if the provider is unable to get to the database and try again until the final shutdown (although, to be honest, I expect an exception to be thrown).

If you added a firewall rule for your network, but did not add it for Azure itself, you may experience this problem.

0
source

Source: https://habr.com/ru/post/1443059/


All Articles