What is causing this memory leak?

Hi there,

I’ve been having some problems in the past months where every now and then my system (HAOS 14, Virtual Aplliance, VirtualBox under Linux) suddenly starts using a lot more memory, and memory starts to increase and decrease rapidly in a sawtooth pattern. I thought it was over with an OS update but it is not. Here’s a graph of my memory usage over the past few days:

These are the add-ons I use, nothing too weird:

Does anyone know what causes this? The odd behavior starts at 22:23 yesterday evening. I had been working on the electricity yesterday, shutting off the power to many appliances including the router, so there may be a few errors in the logbook that are not related to this, but perhaps it can be of use:

This error shows up in the core log, related to a few new devices (zigbee button and WLED devices) I added yesterday:

Source: components/recorder/entity_registry.py:76
integration: Recorder (documentation, issues)
First occurred: December 20, 2024 at 21:19:15 (35 occurrences)
Last logged: December 21, 2024 at 22:31:29

Cannot migrate history for entity_id `switch.wled_reverse_2` to `switch.ledstrip_3_reverse_2` because the new entity_id is already in use
Cannot migrate history for entity_id `number.wled_speed_2` to `number.ledstrip_3_speed_2` because the new entity_id is already in use
Cannot migrate history for entity_id `switch.wled_sync_receive_2` to `switch.ledstrip_3_sync_receive_2` because the new entity_id is already in use
Cannot migrate history for entity_id `switch.wled_sync_send_2` to `switch.ledstrip_3_sync_send_2` because the new entity_id is already in use
Cannot migrate history for entity_id `sensor.lumi_lumi_remote_b1acn01_battery` to `sensor.gang_knop_weggaan_battery` because the new entity_id is already in use

This error has the right timing, at least the last entry of it, but it is not clear to me how it could be related (some devices I unplugged earlier in the day and cannot be reached)

Source: runner.py:154
First occurred: December 21, 2024 at 15:03:05 (115 occurrences)
Last logged: December 21, 2024 at 22:24:21

wifirelay001 @ 192.168.100.104: Connection error occurred: Ping response not received after 90.0 seconds
wifirelay001 @ 192.168.100.104: Connection error occurred: [Errno 104] Connection reset by peer
p1-dongle @ 192.168.100.15: Connection error occurred: Ping response not received after 90.0 seconds
p1-dongle @ 192.168.100.15: Connection error occurred: [Errno 104] Connection reset by peer
p1-dongle @ 192.168.100.15: Connection error occurred: p1-dongle @ 192.168.100.15: Connection lost 

Supervisor log:

2024-12-21 22:12:59.329 INFO (MainThread) [supervisor.resolution.evaluate] Starting system evaluation with state running
2024-12-21 22:12:59.555 INFO (MainThread) [supervisor.resolution.evaluate] System evaluation complete
2024-12-21 22:12:59.556 INFO (MainThread) [supervisor.resolution.fixup] Starting system autofix at state running
2024-12-21 22:12:59.556 INFO (MainThread) [supervisor.resolution.fixup] System autofix complete
2024-12-21 22:40:25.374 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-12-21 23:08:07.823 ERROR (MainThread) [supervisor.api.ingress] Stream error with http://172.30.33.2:1337/stable-3542bd157b0ccc8bf732acdb03d4d69d85f48ea9/static/out/vs/workbench/services/keybinding/browser/keyboardLayouts/layout.contribution.win.js: Cannot write to closing transport
2024-12-21 23:08:08.928 ERROR (MainThread) [supervisor.api.ingress] Stream error with http://172.30.33.2:1337/stable-3542bd157b0ccc8bf732acdb03d4d69d85f48ea9/static/out/vs/base/browser/ui/codicons/codicon/codicon.ttf: Cannot write to closing transport
2024-12-21 23:08:09.088 ERROR (MainThread) [supervisor.api.ingress] Stream error with http://172.30.33.2:1337/stable-3542bd157b0ccc8bf732acdb03d4d69d85f48ea9/static/out/vs/base/worker/workerMain.js: Cannot write to closing transport
2024-12-21 23:10:29.033 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
2024-12-21 23:12:59.557 INFO (MainThread) [supervisor.resolution.check] Starting system checks with state running
2024-12-21 23:12:59.559 INFO (MainThread) [supervisor.resolution.checks.base] Run check for trust/supervisor

The most important one: host log. That is so long that even the max download of 10k lines doesn’t get me back to 13 hrs ago! Here’s an excerpt with processes being killed and memory listing. There seem to be a lot of copies of docker proxy and containerd-shim?? I don’t have clue what that means, can someone give me a hint?

 2024-12-21 23:07:09.867 VeulenSmart kernel: Node 0 DMA32 free:28096kB boost:19720kB min:26716kB low:29792kB high:32868kB reserved_highatomic:2048KB active_anon:426976kB inactive_anon:1902796kB active_file:33136kB inactive_file:41596kB unevictable:3072kB writepending:244kB present:3179592kB managed:3082328kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
2024-12-21 23:07:09.869 VeulenSmart kernel: lowmem_reserve[]: 0 0 0 0 0
2024-12-21 23:07:09.869 VeulenSmart kernel: Node 0 DMA: 3*4kB (UM) 3*8kB (UE) 5*16kB (UE) 3*32kB (UME) 5*64kB (UME) 2*128kB (UE) 4*256kB (UME) 2*512kB (ME) 1*1024kB (E) 2*2048kB (ME) 1*4096kB (M) = 12052kB
2024-12-21 23:07:09.869 VeulenSmart kernel: Node 0 DMA32: 1635*4kB (UME) 1103*8kB (UME) 427*16kB (UME) 81*32kB (ME) 20*64kB (ME) 5*128kB (M) 0*256kB 0*512kB 0*1024kB 1*2048kB (H) 0*4096kB = 28756kB
2024-12-21 23:07:09.875 VeulenSmart kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
2024-12-21 23:07:09.877 VeulenSmart kernel: 21628 total pagecache pages
2024-12-21 23:07:09.882 VeulenSmart kernel: 1847 pages in swap cache
2024-12-21 23:07:09.884 VeulenSmart kernel: Free swap  = 180kB
2024-12-21 23:07:09.889 VeulenSmart kernel: Total swap = 1022232kB
2024-12-21 23:07:09.889 VeulenSmart kernel: 798897 pages RAM
2024-12-21 23:07:09.889 VeulenSmart kernel: 0 pages HighMem/MovableOnly
2024-12-21 23:07:09.889 VeulenSmart kernel: 24475 pages reserved
2024-12-21 23:07:09.889 VeulenSmart kernel: Tasks state (memory values in pages):
2024-12-21 23:07:09.893 VeulenSmart kernel: [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
2024-12-21 23:07:09.893 VeulenSmart kernel: [     99]   100    99     1752       64    53248      160          -900 dbus-broker-lau
2024-12-21 23:07:09.904 VeulenSmart kernel: [    104]   100   104     1014       96    45056       96          -900 dbus-broker
2024-12-21 23:07:09.906 VeulenSmart kernel: [    106]     0   106    24974      137   221184      224          -250 systemd-journal
2024-12-21 23:07:09.911 VeulenSmart kernel: [    110]     0   110   115616      352   131072      320             0 udisksd
2024-12-21 23:07:09.914 VeulenSmart kernel: [    143]     0   143     4084      126    69632      512         -1000 systemd-udevd
2024-12-21 23:07:09.916 VeulenSmart kernel: [    186]     0   186   400958      471   155648      192             0 os-agent
2024-12-21 23:07:09.916 VeulenSmart kernel: [    343]   103   343     3944      192    77824      288             0 systemd-resolve
2024-12-21 23:07:09.916 VeulenSmart kernel: [    366]     0   366   117175      512   143360      416             0 NetworkManager
2024-12-21 23:07:09.916 VeulenSmart kernel: [    369]     0   369    77471       32   106496      320             0 rauc
2024-12-21 23:07:09.917 VeulenSmart kernel: [    370]     0   370      924       64    53248       32             0 rpcbind
2024-12-21 23:07:09.917 VeulenSmart kernel: [    374]     0   374     3446      128    69632      192             0 systemd-logind
2024-12-21 23:07:09.923 VeulenSmart kernel: [    376]     0   376     3082       96    65536      160             0 wpa_supplicant
2024-12-21 23:07:09.926 VeulenSmart kernel: [    428]     0   428   463593     3786   258048     1472          -999 containerd
2024-12-21 23:07:09.933 VeulenSmart kernel: [    438]   104   438    21843       96    77824      192             0 systemd-timesyn
2024-12-21 23:07:09.933 VeulenSmart kernel: [    460]     0   460   624167     3341   548864     4253          -400 dockerd
2024-12-21 23:07:09.934 VeulenSmart kernel: [    673]     0   673   417728       32   139264      192          -400 docker-proxy
2024-12-21 23:07:09.934 VeulenSmart kernel: [    680]     0   680   399231       64   126976      160          -400 docker-proxy
2024-12-21 23:07:09.938 VeulenSmart kernel: [    701]     0   701   533088     1687   237568      320          -998 containerd-shim
2024-12-21 23:07:09.938 VeulenSmart kernel: [    722]     0   722   179596      167   102400      576          -300 observer
2024-12-21 23:07:09.940 VeulenSmart kernel: [    789]     0   789   423609       96   196608     1056             0 docker
2024-12-21 23:07:09.940 VeulenSmart kernel: [    792]     0   792     1003       32    49152       32             0 hassos-cli
2024-12-21 23:07:09.940 VeulenSmart kernel: [    797]     0   797      625       96    45056        0             0 agetty
2024-12-21 23:07:09.940 VeulenSmart kernel: [    848]     0   848   533088      969   237568      320          -998 containerd-shim
2024-12-21 23:07:09.940 VeulenSmart kernel: [    867]     0   867      109        0    28672        0          -300 s6-svscan
2024-12-21 23:07:09.940 VeulenSmart kernel: [    903]     0   903       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.941 VeulenSmart kernel: [    906]     0   906       51        0    24576        0          -300 s6-linux-init-s
2024-12-21 23:07:09.943 VeulenSmart kernel: [    912]     0   912       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.946 VeulenSmart kernel: [    913]     0   913       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.946 VeulenSmart kernel: [    921]     0   921       52        0    28672        0          -300 s6-ipcserverd
2024-12-21 23:07:09.950 VeulenSmart kernel: [    961]     0   961       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.951 VeulenSmart kernel: [    963]     0   963       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.951 VeulenSmart kernel: [    964]     0   964     1058       64    49152      512          -300 bash
2024-12-21 23:07:09.951 VeulenSmart kernel: [    967]     0   967    61271     6392   528384    16895          -300 python3
2024-12-21 23:07:09.951 VeulenSmart kernel: [   1090]     0  1090   533088      935   233472      288          -998 containerd-shim
2024-12-21 23:07:09.954 VeulenSmart kernel: [   1110]     0  1110      110        0    28672        0             0 s6-svscan
2024-12-21 23:07:09.956 VeulenSmart kernel: [   1157]     0  1157   460763     1024   229376      416             0 docker
2024-12-21 23:07:09.961 VeulenSmart kernel: [   1175]     0  1175      580       32    40960       32             0 cli.sh
2024-12-21 23:07:09.965 VeulenSmart kernel: [   1183]     0  1183       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.965 VeulenSmart kernel: [   1186]     0  1186       51        0    24576        0             0 s6-linux-init-s
2024-12-21 23:07:09.967 VeulenSmart kernel: [   1193]     0  1193       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.968 VeulenSmart kernel: [   1194]     0  1194       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.970 VeulenSmart kernel: [   1207]     0  1207       52        0    28672        0             0 s6-ipcserverd
2024-12-21 23:07:09.971 VeulenSmart kernel: [   1248]     0  1248   533088      899   233472      288          -998 containerd-shim
2024-12-21 23:07:09.977 VeulenSmart kernel: [   1277]     0  1277      110        0    28672        0          -300 s6-svscan
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1314]     0  1314       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1315]     0  1315       51        0    24576        0          -300 s6-linux-init-s
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1323]     0  1323       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1324]     0  1324       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1332]     0  1332       52        0    28672        0          -300 s6-ipcserverd
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1374]     0  1374       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:09.978 VeulenSmart kernel: [   1376]     0  1376   313157     2484   266240      832          -300 coredns
2024-12-21 23:07:09.982 VeulenSmart kernel: [   1400]     0  1400   533088      910   237568      288          -998 containerd-shim
2024-12-21 23:07:09.982 VeulenSmart kernel: [   1425]     0  1425      110        0    32768        0             0 s6-svscan
2024-12-21 23:07:09.982 VeulenSmart kernel: [   1468]     0  1468       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.982 VeulenSmart kernel: [   1470]     0  1470       51        0    24576        0             0 s6-linux-init-s
2024-12-21 23:07:09.982 VeulenSmart kernel: [   1477]     0  1477       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.984 VeulenSmart kernel: [   1478]     0  1478       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.984 VeulenSmart kernel: [   1479]     0  1479       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.985 VeulenSmart kernel: [   1480]     0  1480       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.987 VeulenSmart kernel: [   1488]     0  1488       52        0    28672        0             0 s6-ipcserverd
2024-12-21 23:07:09.987 VeulenSmart kernel: [   1518]     0  1518   533024      939   241664      317          -998 containerd-shim
2024-12-21 23:07:09.987 VeulenSmart kernel: [   1537]     0  1537      110        0    32768        0             0 s6-svscan
2024-12-21 23:07:09.987 VeulenSmart kernel: [   1560]     0  1560     1039       64    53248      480             0 bash
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1575]     0  1575     1636       64    49152       96             0 udevadm
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1585]     0  1585       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1588]     0  1588       51        0    24576        0             0 s6-linux-init-s
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1619]     0  1619       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1621]     0  1621       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1633]     0  1633       52        0    28672        0             0 s6-ipcserverd
2024-12-21 23:07:09.988 VeulenSmart kernel: [   1692]     0  1692       54        0    28672        0             0 s6-supervise
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1694]     0  1694      227        0    49152        0             0 mdns-repeater
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1782]     0  1782    22568      192    90112      320             0 pulseaudio
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1885]     0  1885   417664       64   143360      192          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1890]     0  1890   399295       64   139264      160          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1898]     0  1898   417728       32   143360      160          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1903]     0  1903   417728       64   139264      192          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1911]     0  1911   417728       64   139264      160          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1920]     0  1920   417728       32   151552      192          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1926]     0  1926   417664       64   139264      160          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1935]     0  1935   417728       96   143360      192          -400 docker-proxy
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1979]     0  1979   533024      980   233472      320          -998 containerd-shim
2024-12-21 23:07:09.991 VeulenSmart kernel: [   1999]     0  1999      110        0    28672        0           200 s6-svscan
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2023]     0  2023      465       32    45056      128             0 rlwrap
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2024]     0  2024      403       32    53248        0             0 cat
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2040]     0  2040       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2043]     0  2043       51        0    24576        0           200 s6-linux-init-s
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2049]     0  2049       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2050]     0  2050       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2058]     0  2058       52        0    28672        0           200 s6-ipcserverd
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2190]     0  2190       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:09.992 VeulenSmart kernel: [   2192]     0  2192   351809     1184   270336     2400           200 mosquitto
2024-12-21 23:07:10.001 VeulenSmart kernel: [   2194]     0  2194       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.001 VeulenSmart kernel: [   2196]     0  2196     2147       32    53248      192           200 nginx
2024-12-21 23:07:10.002 VeulenSmart kernel: [   2222]     0  2222     2147       41    53248      192           200 nginx
2024-12-21 23:07:10.002 VeulenSmart kernel: [   2310]     0  2310   533088     1822   241664      479          -998 containerd-shim
2024-12-21 23:07:10.002 VeulenSmart kernel: [   2331]     0  2331      109        0    28672        0           200 s6-svscan
2024-12-21 23:07:10.004 VeulenSmart kernel: [   2352]     0  2352       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.004 VeulenSmart kernel: [   2355]     0  2355       51        0    24576        0           200 s6-linux-init-s
2024-12-21 23:07:10.005 VeulenSmart kernel: [   2363]     0  2363       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.005 VeulenSmart kernel: [   2365]     0  2365       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.007 VeulenSmart kernel: [   2366]     0  2366       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.007 VeulenSmart kernel: [   2367]     0  2367       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.008 VeulenSmart kernel: [   2379]     0  2379       52        0    28672        0           200 s6-ipcserverd
2024-12-21 23:07:10.008 VeulenSmart kernel: [   2408]     0  2408   533088      912   237568      320          -998 containerd-shim
2024-12-21 23:07:10.008 VeulenSmart kernel: [   2431]     0  2431      109        0    28672        0           200 s6-svscan
2024-12-21 23:07:10.008 VeulenSmart kernel: [   2512]     0  2512       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.009 VeulenSmart kernel: [   2515]     0  2515       51        0    24576        0           200 s6-linux-init-s
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2531]     0  2531       54        0    32768        0           200 s6-supervise
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2532]     0  2532       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2541]     0  2541       52        0    28672        0           200 s6-ipcserverd
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2652]     0  2652     9645      160   118784      544           200 smbd
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2666]     0  2666     6628      127    94208      416           200 nmbd
2024-12-21 23:07:10.010 VeulenSmart kernel: [   2735]     0  2735   533152     1367   245760      448          -998 containerd-shim
2024-12-21 23:07:10.012 VeulenSmart kernel: [   2776]     0  2776      110        0    28672        0           200 s6-svscan
2024-12-21 23:07:10.012 VeulenSmart kernel: [   2784]     0  2784     9113      106   114688      544           200 smbd-notifyd
2024-12-21 23:07:10.012 VeulenSmart kernel: [   2786]     0  2786     9119       42   114688      544           200 smbd-cleanupd
2024-12-21 23:07:10.012 VeulenSmart kernel: [   2825]     0  2825       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.013 VeulenSmart kernel: [   2827]     0  2827       54        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.013 VeulenSmart kernel: [   2828]     0  2828      403       32    45056        0           200 sleep
2024-12-21 23:07:10.013 VeulenSmart kernel: [   2830]     0  2830     1734       64    57344      128           200 ttyd
2024-12-21 23:07:10.016 VeulenSmart kernel: [   2886]     0  2886       55        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.017 VeulenSmart kernel: [   2889]     0  2889       51        0    24576        0           200 s6-linux-init-s
2024-12-21 23:07:10.017 VeulenSmart kernel: [   2898]     0  2898       55        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.017 VeulenSmart kernel: [   2899]     0  2899       55        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.017 VeulenSmart kernel: [   2900]     0  2900       55        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.017 VeulenSmart kernel: [   2908]     0  2908       52        0    28672        0           200 s6-ipcserverd
2024-12-21 23:07:10.017 VeulenSmart kernel: [   3625]     0  3625   274301      674   933888     4608           200 node
2024-12-21 23:07:10.017 VeulenSmart kernel: [   3728]     0  3728   330336     2320  1511424    12127           200 node
2024-12-21 23:07:10.017 VeulenSmart kernel: [   3794]     0  3794     8236      148    98304      448           200 samba-dcerpcd
2024-12-21 23:07:10.017 VeulenSmart kernel: [   3803]     0  3803     9824      255   118784      384           200 rpcd_classic
2024-12-21 23:07:10.017 VeulenSmart kernel: [   3970]     0  3970     1752       32    49152       64             0 bluetoothd
2024-12-21 23:07:10.018 VeulenSmart kernel: [   4036]     0  4036   417728       64   135168      160          -400 docker-proxy
2024-12-21 23:07:10.018 VeulenSmart kernel: [   4044]     0  4044   399231       32   135168      160          -400 docker-proxy
2024-12-21 23:07:10.018 VeulenSmart kernel: [   4066]     0  4066   533088      895   241664      288          -998 containerd-shim
2024-12-21 23:07:10.018 VeulenSmart kernel: [   4086]     0  4086      248       64    28672        0           200 docker-init
2024-12-21 23:07:10.019 VeulenSmart kernel: [   4118]     0  4118    16211     2590   176128     5408           200 python3
2024-12-21 23:07:10.019 VeulenSmart kernel: [  17365]     0 17365     4649       64    77824       96          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [  17373]     0 17373     4676       64    81920       96          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [  17431]     0 17431     4649       64    69632      128          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [  17683]     0 17683     4651       64    77824      128          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 382214]     0 382214     4325       32    81920      128          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 382222]     0 382222     3887       32    69632      128          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 382238]     0 382238     4658       32    77824      128          -300 git
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392287]     0 392287   533088      938   241664      288          -998 containerd-shim
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392308]     0 392308      110        0    28672        0          -300 s6-svscan
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392331]     0 392331       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392333]     0 392333       51        0    24576        0          -300 s6-linux-init-s
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392340]     0 392340       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392341]     0 392341       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:10.021 VeulenSmart kernel: [ 392349]     0 392349       52        0    28672        0          -300 s6-ipcserverd
2024-12-21 23:07:10.022 VeulenSmart kernel: [ 392380]     0 392380       54        0    28672        0          -300 s6-supervise
2024-12-21 23:07:10.022 VeulenSmart kernel: [ 392382]     0 392382   412555    27887  2519040   120830          -300 python3
2024-12-21 23:07:10.022 VeulenSmart kernel: [ 392531]     0 392531   310125      675   135168     3871          -300 go2rtc
2024-12-21 23:07:10.022 VeulenSmart kernel: [ 667331] 63112 667331   297306      167  1146880      224             0 systemd-journal
2024-12-21 23:07:10.022 VeulenSmart kernel: [ 727293]     0 727293   533024     1005   241664      320          -998 containerd-shim
2024-12-21 23:07:10.025 VeulenSmart kernel: [ 727315]     0 727315       52        0    28672        0           200 s6-svscan
2024-12-21 23:07:10.025 VeulenSmart kernel: [ 727377]     0 727377       53        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.025 VeulenSmart kernel: [ 727378]     0 727378       50        0    24576        0           200 s6-linux-init-s
2024-12-21 23:07:10.025 VeulenSmart kernel: [ 727386]     0 727386       53        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.026 VeulenSmart kernel: [ 727387]     0 727387       53        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.026 VeulenSmart kernel: [ 727388]     0 727388       53        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.029 VeulenSmart kernel: [ 727389]     0 727389       53        0    28672        0           200 s6-supervise
2024-12-21 23:07:10.030 VeulenSmart kernel: [ 727397]     0 727397       47        0    24576        0           200 s6-ipcserverd
2024-12-21 23:07:10.030 VeulenSmart kernel: [ 728066]     0 728066    51554     3317   167936     7168           200 esphome
2024-12-21 23:07:10.030 VeulenSmart kernel: [ 728115]     0 728115     2591       74    57344      192           200 nginx
2024-12-21 23:07:10.030 VeulenSmart kernel: [ 728153]     0 728153     2866      407    57344      416           200 nginx
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 788966]     0 788966   490023     3630  2519040    18681           200 node
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 799933]     0 799933   489145     4139  2539520    17552           200 node
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 810331]     0 810331   561055   307892 27332608     9696           200 node
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 815847]     0 815847   464546   210288 17690624    10592           200 node
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 820377]     0 820377      403       32    45056        0          -300 sleep
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821718]     0 821718      644      320    45056        0           200 sh
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821719]     0 821719     1595      448    53248        0           200 ls
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821720]     0 821720     1576      352    53248        0           200 grep
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821721]     0 821721      644      352    40960        0           200 sh
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821722]     0 821722      644        0    40960        0           200 sh
2024-12-21 23:07:10.031 VeulenSmart kernel: [ 821723]     0 821723      644        0    40960        0           200 sh
2024-12-21 23:07:10.031 VeulenSmart kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/docker-5948b12a9be65ce3891c6f3b67bd6638e31fa408244aa67f64a98d057df6e7d0.scope,task=node,pid=810331,uid=0
2024-12-21 23:07:10.031 VeulenSmart kernel: Out of memory: Killed process 810331 (node) total-vm:2244220kB, anon-rss:1226960kB, file-rss:4608kB, shmem-rss:0kB, UID:0 pgtables:26692kB oom_score_adj:200
2024-12-21 23:07:10.039 VeulenSmart systemd[1]: docker-5948b12a9be65ce3891c6f3b67bd6638e31fa408244aa67f64a98d057df6e7d0.scope: A process of this unit has been killed by the OOM killer.
2024-12-21 23:22:07.995 VeulenSmart kernel: kswapd0 invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
2024-12-21 23:22:08.022 VeulenSmart kernel: CPU: 0 PID: 45 Comm: kswapd0 Not tainted 6.6.63-haos #1
2024-12-21 23:22:08.023 VeulenSmart kernel: Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006

Do you use AMP (alex media player) or the CPU speed integrations?

AMP is buggy as heck and basically breaks every release.

CPU Speed has a hard to reporduce issue that prevents me using it: CPU Speed a little loads the CPU and raises temperature of the CPU · Issue #71388 · home-assistant/core · GitHub

Nope, neither of those

2024.5+: Tracking down instability issues caused by integrations.

Hello Allard K

Code Server is by far the biggest memory user in your add-on list.
Experiment and see if you get a jump when you open that up.

I think you hit the nail on the head here. I just started up code server and it led to a fast jump in memory use (0.9 to 1.4 G), followed by a rising trend. There’s also a huge jump in processor use followed by a step down but still way more than should be necessary IMO.

I just checked, shutting down the addon manually immediately releases the memory and cpu. I noticed there was an update available, (5.17.1 to 5.17.3). Doing that now to see if it makes a difference (changelog only has a few dependency updates but who knows).

Code Server / VS Code has only increases in memory usage as the program grows and features are added by the code owners of the add-on.
Personally I have 16gb and don’t care how much it uses, but if you are not that lucky, shut it down when not in use.

The updated version shows the same behavior. Note that starting the addon doesn’t increase the memory or processor much. It’s when I start the web UI that the increase starts. And it doesn’t stop until the OS runs out of memory and kills some process. After which it keeps increasing again, etc etc, until I restart, which automatically stops the addon.
Does your system show similar behavior? If so, at what level does it stop? I increased memory from 2 to 3 G before and it didn’t make a difference, it just grows to a higher number.
If this is expected behavior for the addon I will just switch back to the simple file editor for remote work and use my desktop version of VScode to edit files over SambaShare when I am home.

My vscode opens at boot, but no gui 2.9G, open the GUI and 3.2G.
I stop the add-on, 2.5G.

I actually had ‘start at boot’ on as well I noticed, it just didn’t start up automatically after the update. A 0.3 G jump seems similar to what I see. But does it also keep increasing with about 50 MiB/min after that for you?

OK, so apparently this is a known issue in the VScode addon, but I guess it does not affect everyone, since otherwise it would probably have been tackled by now. In any case there’s also a user with 16 GB of RAM who runs out after some time.

There doesn’t appear to be anyone working on the issue. I’ll just uninstall the add-on.

I would just leave the addon-vscode off by default, and would turn it back on, only when needed.

1 Like

I don’t need the add-on so badly that I would risk destabilizing my instance if I forgot to turn off the add-on after use, or use it for more than half an hour.
I only use it to edit configuration and automation files. There are alternatives for that which don’t cause memory leak issues.

The issue is the addon does not clear the previous session once you leave the UI.

If you start the addon, it will be fine. If you enter the web UI t will use more memory and CPU, which is probably normal. When you leave the Web UI it will not clear out the process and continue to use the resources. If you re-enter the Web UI, more resources will be used. You can reproduce this by entering UI, leaving, re-enter UI, multiple times while watching your resources. It is like ever session remains and is never shutdown/cleared to free the resources.

I’m not sure this is what is happening, or least it’s not the only thing. In my case, it kept increasing memory use even when I wasn’t entering the Web UI or the HA ui in general. As you can see in the top post, this was happening through the night.