Troubleshooting
Symptom-first entry point for diagnosing Elsa workflow, host, and Studio issues.
Use this guide to choose a first diagnostic signal and find its focused runbook. An individual workflow's state, host readiness, and process-level diagnostics answer different questions.
For short answers and links to the right task-specific guide, see the Frequently Asked Questions.
Choose the first diagnostic
Use workflow-instance records for one workflow, readiness checks for the Elsa probes configured on the host, and logs or traces for process-level behavior. A healthy readiness result does not prove that every external dependency is reachable or that a particular business workflow will complete.
Instance appears idle or stopped
Read status, sub-status, and the latest journal entry in Investigate a Workflow Instance. A suspended instance may be waiting; if an expected event or timer is missing, check triggers or timers.
Expected event did not resume an instance or scheduled trigger did not fire
Check the matching bookmark or trigger and the scheduler path: Using a Trigger, Timer and Scheduled Workflows, Quartz Scheduling.
Instance faulted or journal shows an activity failure
Start with any incident and the journal; inspect the activity execution record if the host captured it. See Investigate a Workflow Instance, then Structured Logs or Distributed Tracing.
New work is not accepted across workflows
Check the Elsa readiness probes registered by the host in Readiness and Health Checks. For a paused or draining runtime, see Runtime Administration and Graceful Drain.
You need backend evidence
Use Structured Logs for ILogger events, Console Logs for managed Console.Out / Console.Error, or configured Distributed Tracing for workflow/activity spans. These complement, but do not replace, the journal.
A diagnostics page is unavailable in Studio
Confirm the backend feature and matching Studio module are enabled, then check the API URL and required access. Start with Structured Logs, Console Logs, or Distributed Tracing, as applicable.
Use the detailed symptom playbooks below for checks specific to triggers, bookmarks, scheduling, and runtime configuration. Avoid assuming an endpoint path or persistence schema: both depend on the host and provider configuration.
Symptom Playbooks
Workflows Don't Start
Symptoms:
Creating a workflow instance via API returns success, but no execution occurs
Workflow appears in "Pending" or never changes to "Running"
No logs indicating workflow execution
Step-by-Step Diagnosis:
Check workflow definition is published:
Verify
isPublished: truein the response.Check for trigger conditions:
If the workflow uses a trigger (HTTP, Timer, etc.), ensure the trigger is configured correctly
For HTTP triggers, verify the endpoint is listening: check logs for
Mapped endpointmessages
Verify workflow runtime is started: Look for startup logs:
Check for exceptions in logs: Increase log level to Debug for Elsa namespaces (see Logging Configuration)
Verify database connectivity:
Common Fixes:
Unpublished definition: Publish the workflow via Elsa Studio or API
Missing trigger registration: Ensure
UseHttp(),UseScheduling(), or other trigger modules are configured in Program.csStartup order issues: Verify Elsa services are registered before
app.Run()
Code Reference:
src/modules/Elsa.Workflows.Core/Middleware/Activities/DefaultActivityInvokerMiddleware.cs- Entry point for activity execution. This middleware orchestrates the execution of activities and is where the workflow execution pipeline begins.
Workflows Don't Resume (Bookmark Issues)
Symptoms:
Workflow is suspended at a blocking activity but never resumes
External events (HTTP callbacks, signals) don't wake the workflow
Logs show "Bookmark not found" errors
Step-by-Step Diagnosis:
Verify the bookmark exists:
Check bookmark hash matches stimulus: Bookmarks are matched using a deterministic hash based on activity type and stimulus data. Mismatched stimulus (e.g., different payload, correlation ID) won't find the bookmark.
Verify distributed lock provider is configured: The
WorkflowResumeracquires a distributed lock before resuming. Without a proper lock provider in multi-node setups, resume operations may fail silently.Check for lock acquisition failures: Enable Debug logging for
Elsa.Workflows.Runtime:Verify stimulus hashing: The bookmark filter uses a hash of (activity type + stimulus payload). If your resume payload doesn't exactly match what was stored when the bookmark was created, the bookmark won't be found.
Common Fixes:
Configure distributed lock provider:
Match stimulus exactly: Ensure the resume payload matches the bookmark's expected stimulus data
Check lock timeouts: Increase lock acquisition timeout for high-latency environments
Code References:
src/modules/Elsa.Workflows.Runtime/Services/WorkflowResumer.cs- UsesIDistributedLockProviderto serialize resume operations. TheResumeWorkflowAsyncmethod acquires a lock on the workflow instance before loading and resuming, preventing concurrent modifications.src/modules/Elsa.Workflows.Core/Contexts/ActivityExecutionContext.cs- ContainsCreateBookmark()which generates bookmarks with deterministic hashes. Bookmarks auto-suspend the workflow when created.
Duplicate Resumes (Concurrency Issues)
Symptoms:
Same workflow step executes multiple times
Duplicate side effects (emails sent twice, records created twice)
Logs show multiple nodes processing the same resume request
Step-by-Step Diagnosis:
Verify distributed locking is enabled: Check for
UseDistributedRuntime()in configuration:Check lock provider connectivity:
Review logs for concurrent lock acquisitions: In a correctly configured cluster, only one node should successfully acquire the lock:
Verify Quartz clustering (for scheduled tasks): Check that all nodes share the same Quartz database and clustering is enabled:
Common Fixes:
Single scheduler pattern: In multi-node deployments, either:
Use Quartz clustering with a shared database
Designate a single scheduler node
Configure distributed locking:
Ensure idempotent activities: Design activities to be safe for replay (check before insert, use idempotency keys)
Code References:
src/modules/Elsa.Workflows.Runtime/Services/WorkflowResumer.cs- Implements distributed locking pattern usingIDistributedLockProviderfrom Medallion.Threading library.src/modules/Elsa.Workflows.Core/Middleware/Activities/DefaultActivityInvokerMiddleware.cs- Handles "bookmark burning" via theAutoBurnoption. When a bookmark is consumed successfully, it's deleted to prevent re-use.
Timers Fire Multiple Times or Not at All
Symptoms:
Scheduled workflows run multiple times per trigger
Timers never fire despite being scheduled
Cron schedules execute at wrong times or skip executions
Step-by-Step Diagnosis:
Check Quartz clustering configuration:
All nodes should appear with recent
last_checkin_time.Verify scheduled bookmarks exist:
Check clock synchronization: All nodes must use synchronized time (NTP). Clock drift causes misfires or duplicates.
Review DefaultBookmarkScheduler behavior: This service categorizes bookmarks by type (Timer, Delay, Cron) and schedules them via Quartz:
Timer/Delay: One-time execution at specific time
Cron: Recurring based on cron expression
Check for misfires:
Common Fixes:
Enable Quartz clustering:
Adjust misfire thresholds:
Use consistent time zones:
Code References:
src/modules/Elsa.Scheduling/Services/DefaultBookmarkScheduler.cs- Categorizes and schedules Timer/Delay/Cron bookmarks. Uses Quartz to scheduleResumeWorkflowTaskjobs for future execution.src/modules/Elsa.Workflows.Runtime/Middleware/Activities/BackgroundActivityInvokerMiddleware.cs- Handles background/job execution for long-running activities. Activities marked for background execution are dispatched to a job queue.
Stuck/Running Workflows and Incident Handling
Symptoms:
Workflows stay in "Running" state indefinitely
Workflow appears stuck at a specific activity
Incidents are created but not handled
Step-by-Step Diagnosis:
Identify stuck workflows:
Inspect the workflow instance's incidents: Open the instance in Elsa Studio or retrieve
GET /workflow-instances/<instance-id>and inspectworkflowState.incidents.Review the workflow journal and activity executions: Check
GET /workflow-instances/<instance-id>/journalor the filteredPOSTvariant, then inspect the failing activity execution in Studio if you need per-activity state or retry metadata.Check for orphaned locks: If a node crashes while holding a lock, the workflow may appear stuck:
Verify background jobs are processing: For activities executed in background, check the job queue:
Common Fixes:
Cancel stuck workflows:
Retry faulted activities: Use
POST /alterations/workflows/retrywith one or moreworkflowInstanceIds, and optionallyactivityIds, after fixing the root cause.Configure incident strategies:
Implement graceful shutdown: Ensure pods wait for in-progress workflows before terminating
Code Reference:
src/modules/Elsa.Workflows.Core/Middleware/Activities/DefaultActivityInvokerMiddleware.cs- Manages activity lifecycle including fault handling. Exceptions during activity execution are caught and can trigger incident creation.
High Database Load / Slow Persistence
Symptoms:
Slow workflow execution times
Database CPU/IO consistently high
Timeout errors during workflow operations
Step-by-Step Diagnosis:
Identify slow queries:
Check table sizes:
Check for missing indexes: Common queries that need indexes:
workflow_instancesbystatus,definition_id,correlation_idbookmarksbyworkflow_instance_id,hash
Review connection pool utilization:
Check for long-running transactions:
Common Fixes:
Increase connection pool size:
Add indexes for common queries:
Implement data retention (see below)
Use read replicas for queries: Configure Elsa to use read replicas for workflow history queries
Logging & Diagnostics
Increasing Log Level
For troubleshooting, increase Elsa log verbosity. See Logging Configuration Examples for complete snippets.
Quick Configuration (appsettings.json):
Key Log Messages to Look For
Workflow started
Starting workflow instance {Id}
Information
Bookmark created
Created bookmark {Hash} for activity {ActivityId}
Debug
Lock acquired
Acquired distributed lock for workflow {Id}
Debug
Lock failed
Lock acquisition failed; resume already in progress
Information
Timer scheduled
Scheduled timer for bookmark {Id} at {Time}
Debug
Activity faulted
Activity {ActivityType} faulted: {Exception}
Error
Bookmark burned
Burned bookmark {Hash}
Debug
Including Correlation/Workflow IDs in Logs
Enable structured logging with workflow context:
In workflows, the workflow instance ID and correlation ID are automatically added to the log scope when using Elsa's logging infrastructure.
OpenTelemetry tracing and diagnostics
In release/3.8.2, core instrumentation emits baseline workflow and activity spans through the Elsa.Workflows activity source. The optional Elsa.OpenTelemetry extension adds a second span layer and error handlers. Separate Studio diagnostics modules provide structured logs, console logs, and OTLP collection.
Quick Setup:
What's Traced:
Workflow execution spans
Activity execution spans
Workflow and activity status events, incidents, and identity tags
For the complete release-backed setup and error-handler behavior, see OpenTelemetry workflow and activity tracing.
Code Reference:
src/modules/Elsa.Workflows.Core/Telemetry/WorkflowInstrumentation.cs- Defines core workflow/activity spans and metrics.elsa-extensions/src/modules/diagnostics/Elsa.OpenTelemetry/*- Defines the optional additional workflow/activity tracing middleware and error-span handlers.src/modules/Elsa.Diagnostics.OpenTelemetry/*- Provides OTLP ingestion, query APIs, and the Studio diagnostics collector surface.
Data Retention & Cleanup
Workflow Instance Retention
Old workflow instances consume database space and slow queries. Configure the separate retention extension for automatic cleanup:
See Retention before enabling deletion in a production environment.
Manual cleanup
Avoid deleting workflow rows directly with SQL. Elsa's retention job also cleans related bookmarks and runtime records, while table names, status storage, and transaction behavior vary by persistence provider. Use a narrow retention policy or the provider's documented maintenance procedure instead. See Retention for the supported filter and cleanup behavior.
Quartz Cleanup
Quartz manages its own cleanup, but old triggers can accumulate:
Production Checklist
Before going to production, verify:
Infrastructure
Elsa Configuration
Observability
Security
Escalation Tips
When troubleshooting doesn't resolve the issue:
Gather Information:
Elsa version (
dotnet list package | grep Elsa).NET version (
dotnet --version)Database type and version
Logs from the time of the issue (with Debug level enabled)
Workflow definition JSON (if applicable)
Reproduce in Isolation:
Create a minimal workflow that demonstrates the issue
Test on a single node to rule out clustering issues
Search Existing Issues:
Create a Bug Report: Include:
Steps to reproduce
Expected vs actual behavior
Relevant logs
Minimal reproduction project (if possible)
Community Resources:
Discord community
Stack Overflow (tag:
elsa-workflows)
Related Documentation
Clustering Guide - Multi-node deployment configuration
Distributed Hosting - Core distributed concepts
Incidents Configuration - Incident handling setup
Retention - Data retention policies
Logging Framework - Activity logging
Supplementary Files
Last Updated: 2025-11-25
Last updated