danielgerlag / danielgerlag/workflow-core

SQL Server database size

Open
#1,332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
5.9k
Forks
1.3k
Avg merge
1d 1h
Merged PRs (30d)
5

Description

**Describe the bug**
WorkflowCore 3.13.0
WorkflowCore.QueueProviders.SqlServer 3.13.0
WorkflowCore.Persistence.SqlServer 3.13.0

Our SQL Server db size increased nearly 30 times in one day (from some MB to 5 GB).

This are the stats of our current DB:
![Image](https://github.com/user-attachments/assets/acaeff23-766e-4f04-b9ce-db701dba0f01)

Regarding the queues: The only queue containing items is "//workflow-core/workflowQueue" with 2k entries.

The only thing I discovered is that there are 6mio conversations (Is this normal?).

**To Reproduce**
1. Create a simple workflow application
2. Start 10 - 40 workflows
3. Let it run for a day
4. Check db

**Expected behavior**
Consistent database size that is not increasing if nothing happens (or at least not 33 times)

**UPDATE:** After deleting them with `END CONVERSATION xxx WITH CLEANUP`, and shrinking the db, it got back to its normal size.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported setup with WorkflowCore 3.13.0, the SQL Server queue and persistence providers, and 10–40 workflows running for a day. Inspect the database queues and conversation count, then verify that the fix prevents runaway growth and that cleanup with END CONVERSATION is no longer required.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.