Closed heisenberg2980 closed 1 year ago
I'm sorry for the low-level code-talk..
I did some memory optimizing for code and noticed there might not need be so much creating new dockerClient on every function-call. I managed to get it work with one. I did same optimizing for other variables that I noticed got created again on different function calls. As a result CPU usage went down (I would guess the garbage collector doesn't have to do so much work) and I got memory to keep under 18MiB. I tested this with 2 additional containers (MariaDB and Portainer).
I'll keep testing code for some time to see if everything keeps working and I did not get overboard with optimizing. I also simplified and/or butchered MainLoop in groups. I guess I was scared about make-calls for calculating rxHistory. I don't know if that is necessary.
Thank you @vmorganp for authoring this great piece of work! I did previously same kind of stuff with systemd, but it seems somewhat messier way to do this from my point of view.
Nice @d3lity. I figured the new client thing was probably the issue but hadn't gotten around to actually doing it.
Any chance you want to create a PR with the changes you mentioned and we can get it merged in?
Thanks for the thanks!
Hey @Heisenberg2980 can you verify if this is still an issue after the latest fix by @d3lity?
Memory is now stable around 15MB
After some time running Lazytainer the machine crashes due to no RAM memory available. After some analysis I realised Lazytainer is increasing the memory ussage overtime until it consumes all available memory. As an example, after being iddle for 10 hours it is using over 400Mb of memory:
No logs are generated.
I am running the latest version Lazytainer (v2.0.4) using docker-compose, this is the docker-compose.yaml: