Hangfire Server Sleeps when Inactive

2.2k views Asked by At

I have set the application pool to:

StartMode - Always Running | Idle-Timeout (minutes) 0 | Preload Enanbled = true

I don't understand why my Hangfire Application still sleeps. Also the server was started a second ago after I open the hangfire application. Any suggestion how to solve this?

enter image description here

1

There are 1 answers

0
Jalpa Panchal On

Enable automatic start-up for Windows Process Activation (WAS) and World Wide Web Publishing (W3SVC) services (enabled by default).

Run this below command to set serviceAutoStartEnabled="true" to your site:

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.applicationHost/sites/site[@name='appname']/applicationDefaults" -name "serviceAutoStartEnabled" -value "True"

Make sure application pool recycling is disabled:

enter image description here

Under Recycling, set the Regular Time Interval (minutes) to 0.

enter image description here

Select Specific Times and either click the > expander arrow to see if there is time specified below or click the ... to see if there are any values in the TimeSpan Collection Editor dialog. If so, clear it out.

enter image description here

Refer this post for more detail:

IIS 10 Application Pool fall a sleep