elsa-workflows / elsa-workflows/elsa-core
Elsa workflows stop triggering after IIS App Pool recycle due to worker process time limit
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
## Summary
We are running Elsa workflows with Quartz cron triggers hosted inside IIS (ASP.NET Core).
Under certain conditions, workflows stop triggering permanently after an IIS Application Pool recycle.
This occurs after IIS force-terminates the worker process due to shutdown or execution time limits.
## Environment
- **Elsa version:** Elsa 3.2.3
- **Hosting:** IIS (in-process)
- **Scheduler:** Quartz (cron triggers)
- **OS:** Windows 10 (Any Windows)
- **App type:** ASP.NET Core Web API
- **App Pool:** AlwaysRunning (but recycled by IIS)
## Observed Behavior
1. Elsa workflows and Quartz cron triggers run normally.
2. IIS initiates an application pool recycle or shutdown.
3. Worker process fails to stop gracefully within IIS time limits.
4. IIS force-terminates the process.
5. After restart:
- Application starts successfully
- Elsa workflows no longer trigger
- Quartz cron jobs do not fire
- No workflow execution logs appear
6. **Manual IIS restart is required** to restore scheduling or re-publishing the workflows.
## Event Viewer Evidence
Immediately before workflows stop triggering, the following Windows Event Viewer (System log) warning is recorded:
A worker process with process id of '3776' serving application pool 'Y-DAHS'
has requested a recycle because the worker process reached its allowed
processing time limit.
In some cases we also observe:
A process serving application pool 'Y-DAHS' exceeded time limits during shut down. The process id was '3776'.
After these events, Elsa workflows are no longer triggered.
## Expected Behavior
Elsa + Quartz should:
- Shut down gracefully when IIS recycles
- Resume cron triggers automatically after restart
Or provide:
- Clear guidance / configuration requirements for IIS hosting
- Or warnings that IIS-hosted execution is not resilient for schedulers
Any guidance, documentation references, or recommended patterns from the Elsa team would be greatly appreciated.
Contributor guide
Assessment
This issue has not been assessed yet.