Site in C # and MVC too slow

3

I developed a site in MVC and C #, but after deploying to the Gogaddy server I have noticed that the first access is very, but very slow.

I almost check if there is a logged-in user, if I do not, I redirect to the login screen for access.

The part of the verification as the login , takes a lot to be done, but after all this, the site works normal, as if everything was normal.

Is there a tool where you can see what and where the bottleneck is on my site?

    
asked by anonymous 28.07.2015 / 01:22

3 answers

4

This behavior is normal on the first post. It occurs for two reasons:

  • Views are recompiled on the first request;
  • Migrations are executed if the first request does some data access.

Now, if the slowness continues during requests, there may be a database bottleneck in your application. It is worthwhile for these cases to perform a Debug of the Actions that take longer to execute.

    
28.07.2015 / 01:33
4

This is relatively common. ASP.Net MVC itself has many components that need warm-up to start working in order.

Of course, it may be that your case is a point outside the curve, but I do not think so.

If you want to check what is delaying the execution, you need to do the profiling of the application. Some tools available specific to this technology:

28.07.2015 / 01:35
2

Your site's Application Pool is probably hibernating after a downtime, commonplace with sites that do not yet have many hits.

As it hibernates, it takes some time to reboot.

If this bothers you too much, you can:

1 - Check if it is possible to reset the "Idle Timeout" in IIS. (I do not think so)

2 - If you can not do this configuration, then to prevent the site hibernate, you can use a monitoring or ping service that will "ping" the url of your site every minute, so the site does not will hibernate more. You can also make a program that calls the url of your site every 10 minutes.

But once your site is used more often, this "problem" will be less noticeable.

References: link

link

    
28.07.2015 / 15:14