OH runs out of memory

Hi Marinus,

Did you find a way to solve the memory leak?
I have the same with the docker and started when I moved from OH2 to OH3. I used multiple version and the current version is 3.4.0.RC1.

You can explicitly set the mx limit to a higher value or remove it then it’ll use the default which depends on RAM (I think for a 2GB ARM machine it’s 512m).

Beware, however, that I haven’t yet seen a system that really needs that much heap.
So if you keep hitting a 320m or even higher limit, it’s likely you have a mem leak.
Increasing the limit further will then buy you some more time but it is not a solution in that case.

1 Like

Hi @HenMus,

no, I stopped trying and went back to a dedicated Raspi for my OH. Currently waiting for a good deal for better hardware in order to move back to Docker for OH.

@mstormi thank you for the info. But if the low value of 320 is enough, why was the system running out of memory almost instantly after starting?

It is no memory leak, it’s just pretty memory consuming. My system uses about 420 MB of heap.

Or you use JS Scripting (GraalJS)…

I am currently trying out to make JS Scripting less heap hungry and faster.