genie-server
genie-server copied to clipboard
Memory increases until kernel crash
I'm running local copy of Almond-Server on a Asus Tinker Board with Armbian OS. After starting the server reserves about 56M, then I see that the memory increases step by step over 1 - 2 days until the system runs out of memory.
2 [||| 2.2%] Tasks: 49, 56 thr; 1 running
3 [|||| 4.0%] Load average: 0.12 0.40 0.54
4 [|||||| 5.2%] Uptime: 03:37:47
Mem[||||||||||||||||||||||||||||||||||||||||||||| 598M/1.95G] CpuFreq1: 1.61 GHz
Swp[ 0K/1001M] CpuFreq2: 1.61 GHz
Cpu Temp: 56 C CpuFreq3: 1.61 GHz
CpuFreq4: 1.61 GHz
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
1313 joerg 20 0 9884 5500 4472 S 0.0 0.3 0:02.06 ├─ /lib/systemd/systemd --user
2907 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:35.68 │ ├─ /usr/bin/node /srv/almond-server/main.js
2918 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.13 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2917 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.14 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2916 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.14 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2915 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.14 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2913 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.00 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2912 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:02.46 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2911 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:02.31 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2910 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:02.60 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2909 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:02.34 │ │ ├─ /usr/bin/node /srv/almond-server/main.js
2908 joerg 20 0 750M 390M 28656 S 0.0 19.5 0:00.00 │ │ └─ /usr/bin/node /srv/almond-server/main.js```
I wonder if this is related to the `Unhandled Home Assistant entity...`
I have a lot of unsupported sensors sending state every now and then.
HI thanks for you report, and sorry for the delay.
I think the issue you're seeing has to do with the garbage collection. By default, node's GC assumes that 1G of memory is available for the JS heap. You can lower the amount of memory by running node --max_old_space_size=200 main.js
.
(size is in megabytes).
In recent experiments with the latest version of Almond, we found that on a 64 bit OS it runs at around 150-180M usage (it is quite more memory hungry than previous versions). If you can, I would set it to 200 or 250 to be sure.
@joerg65 are you still able to reproduce this?
Yes