danielgerlag / danielgerlag/workflow-core
Large number of SQL connections requested from Workflow Core
- Dominant language
- C#
- Stars
- 5.9k
- Forks
- 1.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 5
Description
**Describe the bug**
We have configured 3 instances of Workflow Core together with Redis for Queue and Locking. We use SQL Server Database with EF Core, and we experienced performance issues regarding slow processing of Workflows and deadlocks. We have set 25 max concurrent workflows.
In performance counters (dotnet-counters) we got this info
```
Name Current Value
[Microsoft.Data.SqlClient.EventSource]
Rate of connections retrieved from the connection pool (count/sec / 1 sec) 580
Rate of connections returned to the connection pool (count/sec / 1 sec) 568
```
There are many connection requests from Workflow Core, can we optimize this? We also tried different numbers of max concurrent workflows, but workflow processing is prolonged.
Also with the growth of the tables, it becomes very slow to handle from handling 12 workflows per second to query querying the same amount per minute.
Is there any way to improve performance?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the slowdown with the reported Workflow Core, Redis, EF Core, and SQL Server setup while observing dotnet-counters. Compare connection-pool activity and table-query performance as workflow volume and table size grow. Done means identifying the bottleneck and documenting or validating a measurable performance improvement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis, sql
- Domain
- backend, databases, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100