Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Memory increasing with ActivityOutputRecord #6158

Open
iio888 opened this issue Nov 28, 2024 · 1 comment
Open

[BUG] Memory increasing with ActivityOutputRecord #6158

iio888 opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@iio888
Copy link

iio888 commented Nov 28, 2024

Description

Program memory will increase continuously when execute a activity with result in a loop.

Steps to Reproduce

Here is my workflow to run.

internal class EndlessWorkflow : WorkflowBase
{
    protected override void Build(IWorkflowBuilder builder)
    {
        builder.Root = While.True(new If(c => true) 
        {
            Then = new Inline(c => Console.WriteLine(“loop”)
        };
    }
} 

Actual Behavior

The number of _records in ActivityOutputRegister is increasing continuously. The memory is going to be 700M after 15 min.

Environment

  • Elsa Package Version: 3.2.3
@iio888 iio888 added the bug Something isn't working label Nov 28, 2024
@iio888
Copy link
Author

iio888 commented Nov 29, 2024

I noticed that there is a similar issue #4900 which has been closed. But I think the core problem has not been resolved. The real reason causes this issues is that the activity (If in my example) is setting result continuously (calling context.Set method) and the ActivityOutputRecord is created continuously at the same time.
In my example code, my workflow won’t exit. So ActivityOutputRegister won’t be disposed, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant