elsa-workflows / elsa-workflows/elsa-core

[BUG] C# scripting memory leak

Open
#5,390 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triaged
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.

  1. Attachments:
    c-sharp-memory-leak.json

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.