Reputation: 69
I have configured Hangfire for my Web API solution. But the Hangfire stops working after sometime logging about stopping signal. However, if API is sit again it loads and works normally. The log produced by Hangfire before stopping is as below. What should I do to prevent this.
[137] INFO Hangfire.Server.BackgroundServerProcess - Server xyz:26756:c4da0558 caught stopping signal... [ServerWatchdog #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop ServerWatchdog:32e9252b stopped in 2.2406 ms [ExpirationManager #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop ExpirationManager:802eb676 stopped in 2.2681 ms [Worker #3] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop Worker:3d798436 stopped in 2.4496 ms [CountersAggregator #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop CountersAggregator:f6091560 stopped in 3.1411 ms [Worker #2] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop Worker:8b960c88 stopped in 3.7784 ms [Worker #2] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop Worker:8b960c88 stopped in 3.7784 ms [Worker #4] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop Worker:8e0e3cc8 stopped in 4.2624 ms [DelayedJobScheduler #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop DelayedJobScheduler:066c3859 stopped in 4.5509 ms [136] INFO Hangfire.Server.BackgroundServerProcess - Server xyz:26756:c4da0558 caught stopped signal... [Worker #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop Worker:dfcd3314 stopped in 5.7981 ms [RecurringJobScheduler #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop RecurringJobScheduler:2b8e4675 stopped in 6.1803 ms [ServerJobCancellationWatcher #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop ServerJobCancellationWatcher:554692cc stopped in 6.216 ms [BackgroundServerProcess #1] INFO Hangfire.Server.BackgroundServerProcess - Server xyz:26756:c4da0558 All dispatchers stopped [ServerHeartbeatProcess #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop ServerHeartbeatProcess:f3cc4077 stopped in 8.3409 ms [BackgroundServerProcess #1] DEBUG Hangfire.Server.BackgroundServerProcess - Server xyz:26756:c4da0558 is reporting itself as stopped... [BackgroundServerProcess #1] INFO Hangfire.Server.BackgroundServerProcess - Server xyz:26756:c4da0558 successfully reported itself as stopped in 199.8624 ms [BackgroundServerProcess #1] DEBUG Hangfire.Processing.BackgroundExecution - Execution loop BackgroundServerProcess:dd1eaf65 stopped in 214.6647 ms [BackgroundServerProcess #1] INFO Hangfire.Server.BackgroundServerProcess - Server virtuadeskdev04:26756:c4da0558 has been stopped in total 212.7921 ms
Upvotes: 4
Views: 3990
Reputation: 69
This was because of Application Pool Idleness set to 20 minutes. I have changed the Start type to Always Running and now Hangfire does not stop.
Upvotes: 1