Ember-cli build memory usage risks failure (OOM) on minimum instance size

Looks like we explicitly increased node’s allowable heap from 500M to 2G - possibly this is a step too far, and 1.5G would be better:

It’s worth noting that ember isn’t the only thing running on the machine, and we’re up against the global limit of RAM+swap. So the machine’s history, and the needs of all other running processes, come into play. My reboot might have helped here to reach a lower high water mark compared to yesterday.

The pull request above was referenced in
Failed to upgrade discourse instance to Feb 15 2022
where we also note that someone had a memory shortage which was resolved by a reboot.

It’s unfortunate that the time command doesn’t report peak memory usage. Possibly, on a machine with at least 3G of RAM and no swap the RSS count would tell us ember’s peak usage. Or possibly we could use another tactic - several are outlined here and there are some ideas here too.

What’s awkward is that we really are interested in memory use here, whereas in many cases people are interested in RAM use, which is a different question.

3 Likes