AllPower
AllPower

Reputation: 195

ASP.NET MVC. Application takes too long to respond when there are no active users using

When the application is being used all the time, the responses seem to be much faster.

For example, if you have active users in the application, making requests to the server, when I access the application, i am instantly taken to the login screen, but if no one has used it for a certain period of time, it seems that the server is hibernating for have no activity and takes too long to answer.

Is this kind of problem normal, because no one is using it or do I have to make a configuration on the server or in the code to solve this?

am the .net fremawork 4.6.1

Upvotes: 0

Views: 768

Answers (1)

johnny 5
johnny 5

Reputation: 21033

Sounds like IIS is putting recycling the application to free resources, you can change the timeout and recycling policy like so:

In order to cancel IIS Timeout and recycling, follow these steps:

Cancel Idle Time-out:

  1. Go into the IIS Manager
  2. Click on Application Pools (on the left)
  3. Right click on the application
  4. Select "Set Application Pool Defaults..."
  5. Change the value of "Idle Time-out (minutes)" from 20 to 0
  6. Click "ok"

Cancel IIS Recycling :

  1. Go into the IIS Manager
  2. Click on Application Pools (on the left)
  3. Right click on the application
  4. Select "Recycling..."
  5. Uncheck "Regular time intervals (in minutes)"
  6. Click next
  7. Click finish

Then just Restart the IIS

Upvotes: 1

Related Questions