How strict ist the 30 Mb RAM limit?

Hi everyone,

In the Developer Tools under Memory (PSS), Homey states:

  • A Homey app should not use more than 30 MB of memory.

  • Reduce the number of Node.js modules to use less memory.

How strict is this limit in practice?

I have noticed that some apps seem to run well above that threshold. For example, the Shelly app appears to use around 45 MB, and even Flow Checker, which seems to be developed by Athom, uses more than 40 MB.

My own app includes many live devices, polls an inverter frequently, and the next version currently in development will add multiple statistics devices with larger data collections. Because of that, I am finding it difficult to stay below the 30 MB.

So my question is:
Is this a hard limit that must always be respected, or more of a guideline as long as the app remains stable and performs well?

Best regards,
Pascal

It’s not strict at all.

Apps get “memory warnings” when they use more than 150MB of RAM, and if they do this for more than 50 seconds, they get killed (unless it’s Athom’s own Matter Bridge app, which is allowed to use twice that amount of RAM). If an app uses more than 300MB of RAM, it gets killed immediately.

1 Like

AFAIK the mentioned 30 MB limit is a leftover from the (Pro) 2016-2019 models.
Some apps use over 40 MB, but that’s exceptional;
Those models kill apps using over 80 MB.

@ Pro 2023 models and up, some apps use over 125 MB without blinking an eye (‘official’ Matter Bridge app).

Thanks, that clarifies things.

I assume you are referring to RSS, not PSS memory. If so, my app should generally be fine, although on older Homey models I may be getting uncomfortably close to the practical limit.

Right now, with 4 regular devices and 3 statistics devices created, the app usually stays just below 30 MB PSS and just below 78 MB RSS. That said, the PSS does fluctuate from time to time — most often rising to around 31–32 MB, and in rarer cases up to 39 MB, before dropping back down again.

At this stage, I do not see the typical pattern of a persistent memory leak. My assumption is that these temporary increases are more likely related to Node.js garbage collection behavior, which can be somewhat lazy before reclaiming memory.

The main concern for me is therefore not the average memory usage, but the occasional spikes — especially on older Homey models, where an RSS limit around 80 MB would leave very little headroom.

Would that be a fair interpretation?

I’ve never seen any app use more than 40MB

Also, Flow Checker is developed by a community developer, not by Athom themselves.

Shelly App. As said, in developer tools app performance PSS 45,2 Mb / RSS 91,3. If you never saw it, here is the evidence.

Flow Checker:


Also 45,6 Mb PSS
And, if it is developed by the community, why is it’s dns com.athom ? Strange that Homey accepts such a dns for the community, but apparently it is a community app.

That’s quite a lot of RAM. I don’t have the “RSS” RAM in my Homey Developer Tools page (only PSS). I’ve never used the Shelly app or the Flowchecker app, but I just checked and the Tuya app uses 31MB of RAM (PSS) which is the highest of all the apps I use (but that can also be because most of my devices are Tuya devices, so it’s busier than the other apps).

I don’t know why it shows com.athom, but it’s definitely a community app

It happens, for example MQTT Hub, Home Assistant community, Audit and Homeyscript often use over 40 MB, depending on the number of synced devices, flows and running scripts

Just to add my thoughts, I find that the same app running on a HP2019 will use far less memory than when running on an HP2023 or later.

App on my HP2019

Same app and same configuration on my HP2026

Then that’s probably the reason why I don’t have any apps that use >40MB (I use a Pro 2019)

I’m not completely sure why this happens, but my guess is that it is related to the Node.js garbage collector.

For non-developers: when an app frees resources that are no longer needed, that memory is usually not reclaimed immediately. Instead, it is cleaned up later by the garbage collector.

Node.js is known for relatively lazy garbage collection, meaning cleanup often happens later rather than sooner. But when available memory becomes more limited, garbage collection can become more aggressive. So on the 2016–2019 Homey models, the system may reclaim memory earlier or more often than on the 2023 model.

In my case, the app starts at around 25 MB and then moves up and down, but over several hours it gradually climbs to about 32 MB before suddenly dropping back to around 28 MB, after which the cycle starts again. My assumption is that something in the 25–28 MB range would probably be enough for the app, but since my 2026 Homey has more RAM available, garbage collection may simply be less aggressive.

Curious if Python apps have different limits… Otherwise… :smiling_face_with_tear: