elsa-workflows / elsa-workflows/elsa-core
[BUG] C# scripting memory leak
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
Description
Using c# script in Condition causes memory leak.
Steps to Reproduce
Create a workflow with While loop with condition 'true' in c#, in the body of the loop just add Delay activity. The workflow attached.
Check resource consumption for the container.
-
Attachments:
c-sharp-memory-leak.json -
Reproduction Rate: Indicate how often the bug occurs when following these steps (e.g., "every time", "intermittently: about 50% of the time").
Expected Behavior
No memory leaks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the attached c-sharp-memory-leak.json workflow, which uses a While loop with a C# condition and a Delay activity, while monitoring container resource consumption. Trace the C# condition execution and repeat behavior to identify the retained resources. Done means the workflow no longer causes memory growth during repeated looping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100