-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
memory leak - high memory usage #546
Comments
Thanks for reporting the issue. Let's try to fix this. |
Thank you. I have started a second instance with example cronjobs. If RAM usage goes up too after some days, I'll share this example. |
My test instance starts at about 10 MB RAM and now need 60 MB RAM. In 3 days. Command:
Using 4 dags from your example:
My other instance now runs for 12 days and need 122 MB RAM. Btw, running of course your latest v1.12.11 release. Thank you. |
Thanks a lot! Will try to pprof using these examples. |
Can you reproduce the memory leak? |
Sorry, not yet because of my bandwidth, but I have removed some unnecessary heap allocations to fix other problems. So it might solve the problem to some extent. |
Ok, will try it after a new release. |
Btw, would you mind clarify the context where you're running Dagu? :) I'm wondering what makes the memory usage so important on your environment. |
Some Raspberry Pi provides only 1GB of RAM or even less (512MB!). It makes you sensible for RAM usage. Any swapping means higher wearing of the SD card and you really don't like a system that is crashed for this reason. But regardless of this, I think any memory leak is something that should be fixed: |
I see, thanks for your clarification. |
Still the same problem with v1.13.0 |
Thank you very much for checking it. Let's continue investigation. |
This test instance still runs and use 90MB RAM. It started with 10MB RAM 5 days ago! To force it, I have changed the timings to */1, */2, */3 and */4 minutes in my example above. It's not just an HTTP request. I've only used your example because it's simple. Mem usage also goes up with other scripts. |
Thanks for the info! I think we can add code to trigger garbage collection after each DAG completes. Additionally, let's implement some APIs and logging to track the running goroutines, memory, and CPU for better debugging and monitoring. We need to investigate the memory usage in more detail, but needs a bit more time. I hope we can get some help for it. |
@helmut72 Do you experience memory leaks if you run the dagu on the OS instead via docker? |
Running on the OS is no option. Every process that is needed to fulfill my services, is running in a container (minus SSH). Then no individual configuration can be forgotten. Also this would be the first process that behave this much different. |
I run dagu with a single instance for about 9 days. Still testing dagu with 3 cronjobs that runs every few minutes. RAM usage starts at around 15MB. After 9 days it use 92MB RAM. In the past it even use over 300MB RAM with a longer uptime.
The text was updated successfully, but these errors were encountered: