MVC Website is working slow RRS feed

  • Question

  • Hi, i have MVC website application that is working slow from the client side, when opening a page ii takes 5-10 seconds.

    when i using the website on the server its working fast.

    the server is working fine, there are no cpu or memory problems.

    we are using local network that is working fine with other systems.

    what can cause this problem? are there any network configuration that i can add to the web.config that can helps?

    • Moved by CoolDadTx Monday, July 16, 2018 2:07 PM ASP.NET related
    Monday, July 16, 2018 6:35 AM

All replies

  • Is it only the first time, or is it always slow? Normally, when a site is unloaded in IIS, it takes a few seconds to start it, the first time someone navigates to it. This is to be expected. After being idle for some time (20 minutes IIRC), it gets unloaded again, so the next time it will once again take a few minutes to start. After that first delay for fetching the first page, any subsequent request should be fast.

    However, if your slowness doesn't only happen the first time, then something is amiss. Yo can try instrumenting your code so that it saves a log with a timestamp at critical places while the page is being generated. By examining the log you can isolate the precise place where time is being lost. For instance, it could happen when opening a connection to a database, in which case you would infer that something is not well tuned in that part.

    Monday, July 16, 2018 6:43 AM
  • its always working slow, its not a database issue because on the server the website is working fast,

    its seems a communication issue between the clients to the server.

    Monday, July 16, 2018 7:10 AM
  • Is it using https? I have seen delays in the clients establishing the connection in cases where the client was trying to access the Certificate Revocation List but it wasn't reachable from the client.

    Note that I wasn't saying that the problem was a database issue, I just used that as an example to illustrate that once you isolate the specific location where the delay is occurring, presuming that it occurs inside your code, then the specific place where it occurs would give us additional clues about the issue. FOR EXAMPLE, if it happened to occur in a database connection (I am not claiming that this is the place where it should be happening) then it should lead us to investigate such connections. The purpose of the example was to emphasize the importance of adding logging to the code in order to be able to isolate such a problem.

    Monday, July 16, 2018 9:52 AM
  • ASP.NET MVC issues can be discussed at the ASP.NET forums


    Monday, July 16, 2018 12:13 PM