-
-
Notifications
You must be signed in to change notification settings - Fork 228
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 in octodash v2.2.0 #2026
Comments
Oh damn. I'm going to investigate this as soon as possible and release a fixed version. I'll let you know once I was able to replicate this. |
Ok I just had a look at this and did a bit of testing. I wasn't able to reproduce this on the dev system. The JS heap size always stayed in the 5-8MB area and also the memory profile doesn't show any obvious signs of a memory leak: Could yo maybe elaborate on what you did to cause OctoDash to fail? Was it just idleing? According to your logs OctoDash is filling up around half of the memory in about 45 minutes, so it would crash after around 70-80 minutes? |
The problem is on my system seen immediately after reboot. System is fresh rebooted and octoprint and octodash is started. Octoprint is connected to 3d printer and only temperature sensor values are exchange between printer, octoprint and octodash. Nothing else is started. I made new top measurement after reboot and there are two processes (pid: 510, 576) of octodash are continuous increasing in the RES memory.
|
Thanks for the additional info! I'll do some further investigation and probably provide a dev build here to test. |
I have made a further investigation and looked how octodash behave if printer is disconnected from octoprint.
|
Interesting find. I'm going to post a dev build here sometime tomorrow, please try that one as well and report whether the memory leak is gone. Thanks! I also don't know what you changed with your top command in your latest comment, but having the arguments for each process actually is super useful, so please include them for further tests if possible! :) |
https://drive.google.com/file/d/1M1_Ksvj49Naxz-Yijxj2pmalApb07Bl0/view?usp=sharing please try this version and report whether this fixes the issue. Also i noticed, that your raspberry only has 512MB of memory, which model are you running this on? |
Thanks, I will test it. I have a raspberry pi 3A+ |
I have run your test version for 40 hour and capture memory usage every 10 minutes with following command: |
Could you try this version: https://drive.google.com/file/d/1uTu9q4XjojOWRfrwU4-win52v4AuwVY0/view?usp=sharing and report whether that fixed the issue? |
I have tested. I looks like that after some time memory increase stops now, see charts. I will further test after my vacation in 3 weeks. |
Ok that looks like we're finally making progress! Thanks for the all graphs. It's really weird that it's allocating memory for a while and then just stops. Might need to do some further digging. Enjoy your vacation! |
I have also been sealing with this. Any idea when the fix will go main stream? |
Once @mithkr has confirmed that this has been fixed for him :) But for now he should enjoy his vacation :) Will definitely be included in the next release though. |
I have now started a long time recording of top, to see memory consumption for 1 week. I will then upload the result. |
Thanks! |
I have now started a long time recording of top, to see memory consumption for 1 week. I will then upload the result. |
Here are the test results. It looks good. Measurement period is about 9 days. No OOM happened. I only see a very little increase in the virtual memory chart (light blue). Due to the jumps in the RES memory chart, due to enabled swap, it is not possible to proof this trend there. I will repeat measurement with disabled swap. But it can be concluded, that the fixes you already provided helped a lot. |
Ok great thanks for the update! If anything weird shows up again feel free to re-open this issue :) |
Describe the bug
System runs out of memory after a while also if idle (no print jobs running).
OOM killer kills octodash, as it has leaked the memory.
[289804.365120] Out of memory: Killed process 509 (octodash) total-vm:817456kB, anon-rss:249080kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:632kB oom_score_adj:0
To Reproduce
Boot Raspberry Pi with auto stared octodash and wait until system runs out of memory.
Monitoring memory usage with top shows memory usage increase of octodash.
Expected behavior
System should not run out of memory.
Screenshots
General Information:
Additional context
The text was updated successfully, but these errors were encountered: