-
-
Notifications
You must be signed in to change notification settings - Fork 11
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 Leak #161
Comments
Hello, I have the same issue, it seems related to the "Use cache in case of an error" setting in the calendar config. Error in docker container:
Repro: (Inject interval every 5s, ICS is 996 kB and has many recurring appointments) @AlmostInteractive: can you confirm you have enabled the "Use cache in case of an error" setting? |
@nescafe2002 I had "Use cache in case of an error" set in my sensors, yes. I've disabled that setting and ran the test again. This is the result: Still steadily increasing. |
That's odd - are you sure you can reproduce the issue with just (only) the ical sensor? |
@nescafe2002 edit deleting my previous post. Turns out one of those was an |
@nescafe2002 So here's the workflow I'm using: |
@nescafe2002 I made a simpler experiment. I turned off all calendar nodes and rebooted my system. I ran it from 1:30 to 4:45 with no calendar nodes. At 4:45 I created and activated this workflow: And the result is pretty clear: Do you have any idea how to get this into a debugger? If I can get a dev environment setup then I'd be happy to fix this myself. |
Hey @nescafe2002, @AlmostInteractive, unfortunately I had no time the last few months for doing some NodeRED coding, because I was studying for the software archticeture certificate ;) As this is finished now, I will have a look at the new issues. Getting this into a debugger is a bit tricky. If there's time, I'll write a docu. Greets, |
@naimo84 If you have time, we can connect over Discord or something. If you can show me how to get this into a debugger, I'd be happy to fix this bug and write the documentation for the repo. That might be faster for you. |
@AlmostInteractive Thanks for offering your help, but spare time is unpredictable with a fulltime job as a teamlead, a wife and a small daughter 😁 writing the docu was not such a big part. May you have a look at https://naimo84.github.io/node-red-contrib-ical-events/guide/debug.html and let me know if it's working for you? Thanks in advance 👍 The markdown can be found in the docu branch 😉 https://github.com/naimo84/kalender-events/blob/docs/docs/guide/debug.md |
@naimo84 I completely understand. 😄 Thanks for these documents, I'll try to get this into a debugger today. Expect me to come back with questions or fixes! 👍 |
Minor update: I've completely erased all functionality from the ical-sensor node apart from creating a node and registering it. Literally only this:
and I still get a weird memory graph: It's slow, but it's consistent. And it is different from having that same trigger node going to the debug node which results in no memory leak, so that's the baseline. |
@naimo84 Thanks for your support. I learned quite a lot hunting down that memory leak, enough that I decided to write my own calendar nodes based on your work. It's 99% your work trimmed down and rewritten to be exactly what I need for my project: I gave you credit but if there's any information you'd like added, removed, or changed then I'm happy to do that. |
Thank you so much for reaching out and sharing your experience with me. I'm thrilled to hear that my work on hunting down the memory leak was helpful to you. It's fantastic to see how you've taken that knowledge and built your own calendar nodes based on my work. I took a look at your GitHub repository, and I must say, it's impressive! I appreciate that you've given credit where it's due and acknowledged my contribution to your project. As of now, everything looks great, and I'm honored to be part of your work. If there are any specific details or information you would like me to provide, please let me know. I'm more than happy to assist you in any way I can. Feel free to reach out if you need further support or have any questions along the way. Keep up the fantastic work, and I wish you continued success with your project! |
Describe the bug
Activating the iCal sensor node leaks memory until eventually it crashes HA.
To Reproduce
This doesn't seem to work with all gmail ical urls. I tried with two of mine; one causes a very noticeable memory leak and the other seems to have none at all.
Steps to reproduce the behavior:
Expected behavior
No memory leak.
Screenshots
Additional context
If it would be possible to add a unit test or something similar, I could plug in my personal ICS file and help debug the memory leak.
The text was updated successfully, but these errors were encountered: