locked
IIS restarting my asp.net core website every ~10 minutes. RRS feed

  • Question

  • User997732178 posted

    I have  a website in .net core and i need to keep things in ram, and for some reason IIS is restarting the website randomly. If i run the website directly from the .EXE in the website folder with CMD it doenst happen, so its something related with IIS.

    How can i stop IIS from restarting the website? 

    Tuesday, March 2, 2021 5:49 PM

All replies

  • User1065476709 posted

    Hi Stay1444,

    How can i stop IIS from restarting the website? 

    I think this may be the application pool recycling caused your website to restart, you can receive a "WAS" sourced event in the System Event Viewer that tells you specifically why it recycled.

    First, please check if your website application pool -> advanced settings -> recycling -> regular time interval  value is 10. If yes, please change it to 0.

    If not, you can try the following settings:

    Website application pool -> advanced settings -> General -> Set start mode to "Always Running".

    Website application pool -> advanced settings -> Process Model-> Set Idle Time-Out (minutes) to 0.

    In IIS Manager, right click on the site for the application, select “Manage Website” -> “Advanced Settings” and set the “Preload Enabled” value to true.

    Best regards,

    Sam

    Wednesday, March 3, 2021 2:33 AM
  • User997732178 posted

    That didnt seem to fix it. 

    Im seeing this in the event logger ( i dont know how exactly is called in english)

    Application 'MACHINE/WEBROOT/APPHOST/REMINETHINGS' has shutdown. (the website)

    and then

    Application 'C:\Web\' started successfully.

    Ive already done everything you said, what could be causing this? its not a pattern, its like random

    Wednesday, March 3, 2021 2:52 PM
  • User1065476709 posted

    Hi Stay1444,

    Ive already done everything you said, what could be causing this? its not a pattern, its like random

    You mean that the time interval for IIS to restart your asp.net core website is random, not every 10 minutes?

    In the Application Pools pane, select the application pool you want edit, in the Actions pane, click Recycling..., On the Recycling Conditions page of the Edit Application Pool Recycling Settings Wizard, select at least one of the options in the Fixed Intervals section, type values into the appropriate text boxes, and then click Next. on the Recycling Events to Log page of the Edit Application Pool Recycling Settings Wizard, select the configurable recycling events and run-time recycling events that you want IIS to send to the event log when they occur, and then click Finish.

    Best regards,

    Sam

    Thursday, March 4, 2021 6:22 AM