Comments (8)
Oh, I forgot to mention, we are using version 3.1.2 of Elsa. So I do not believe it is the same issue as the Code Activity memory leak.
from elsa-core.
Based on the context provided, it seems that you are experiencing a memory leak issue with Elsa 3 when using Timer or CRON triggered workflows. This is a known issue that has been reported by other users as well, as seen in the GitHub issue #4884. The issue describes a memory leak related to CodeActivity
which may be similar to what you are experiencing with Timer or CRON activities.
To address this issue, you can try the following steps:
-
Update Elsa to the latest version: Ensure that you are using the latest version of Elsa, as the issue might have been addressed in a newer release.
-
Monitor Garbage Collection (GC): Use tools like dotMemory to monitor memory allocations and GC. This can help you identify if the memory is indeed not being collected.
-
Implement IDisposable: If you have custom activities, ensure that they implement
IDisposable
and properly dispose of any unmanaged resources. -
Check for Subscriptions: Ensure that any event handlers or message subscriptions are being properly unsubscribed or disposed of to prevent memory leaks.
-
Review Configuration: Review your Elsa configuration to ensure that you are not unintentionally retaining workflow instances in memory. For example, check if you are using a persistent workflow store and if the configuration of the store is correct.
-
Report the Issue: If none of the above steps help, and you are using the latest version of Elsa, consider reporting the issue on the Elsa GitHub repository. Provide detailed information about your environment, the version of Elsa you are using, and the steps to reproduce the issue.
-
Seek Community Help: You can also seek help from the Elsa community on platforms like Stack Overflow or the Elsa Slack channel. Other users or the developers might have encountered similar issues and could have solutions.
-
Workaround: As a temporary workaround, you might consider implementing a mechanism to periodically restart your service to clear the memory until a permanent fix is available.
Please note that without specific details about your environment and the version of Elsa you are using, it's challenging to provide a precise solution. If you can provide more details, I may be able to offer more targeted advice.
This comment was generated by Glime.
from elsa-core.
Confirmed:
@rboylesDev thanks for reporting!
from elsa-core.
Actually, when I let it running, it seems to purge memory:
So now I am not really sure there is a memory leak 🤔
from elsa-core.
Unless the "23,4 unreachable" is a hint.
from elsa-core.
@rboylesDev Just to make sure: is the application using non-memory stores for all of the modules:
- Workflow Management
- Workflow Runtime
Unless you explicitly configure the persistence provider for these two, they will use the Memory provider by default - which will most certainly lead to an increase of memory consumption as new workflow instances and execution records are stored in an in-memory dictionary.
from elsa-core.
We are using Elsa with EF Core and SQL Server. I believe these are configured correctly as it is a very simple code setup.
from elsa-core.
Minor update on our end. We decided to look at Quartz scheduler instead of the built-in scheduler. This had the same result of allocating ~200MB per scheduled workflow run and never seeming to release it. What is interesting is taking the same workflow and manually running it does not see the same jump in allocation.
from elsa-core.
Related Issues (20)
- [BUG] Exception when saving workflow execution logs after running alterations when using MongoDb storage HOT 3
- [BUG] `Variable` and `Input` Do Not Work for Custom `IWorkflowProvider` Implementation HOT 3
- [FEAT] Add JS Functions and Activities for Encoding/Decoding Bytes and Base64
- [BUG] workflow die when i use activity Elsa.Delay in elsa 3
- [BUG] Error when Set Variable from Json data HOT 2
- [BUG] Remote Login default from elsa 3 and add custom login page
- [BUG] Revert Variable Accessors Returning Copy Instead of Reference
- [DOC] <Parallel execution of activities>how to use this feature?
- [FEAT] Bookmarks- Custom Payload Comparison
- Garbage Elsa, you haven't helped solve so many problems for so long. What else are you doing with open source? HOT 5
- MongoDB: Bulk Write Operation Error with '$type' Field in Elsa Workflows HOT 1
- [BUG] Collection serialization 3.2.0rc5 HOT 2
- [BUG]Memory usage cannot be reduced
- [BUG] Disappear Activity Elsa V3 HOT 1
- [BUG] NullReferenceException When Parsing a HttpResponse without content-type HOT 1
- Vue Designer HOT 1
- [BUG] CustomTenantAccessor causes Http Endpoint 404 in elsa 2.14 #2861 HOT 1
- [BUG] Event payload missing when an event bookmark is resumed. HOT 1
- [FEAT] Implement Modular Import/Export Functionality Using Recipe Handlers
- [BUG] Elsa 3.2.0 ParallelForEach properties serialization Error HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elsa-core.