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

**URL:** https://meta.discourse.org/t/ember-cli-build-memory-usage-risks-failure-oom-on-minimum-instance-size/245547
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [November 14, 2022, 5:35pm UTC](https://meta.discourse.org/t/ember-cli-build-memory-usage-risks-failure-oom-on-minimum-instance-size/245547 "2022-11-14T17:35:24Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [November 15, 2022, 5:46pm UTC](https://meta.discourse.org/t/ember-cli-build-memory-usage-risks-failure-oom-on-minimum-instance-size/245547/4 "2022-11-15T17:46:48Z")

</div>

> [@david](#):
>
> We’re using pretty standard ember tooling here, so I’m not sure there’s much we can do in terms of config to reduce memory usage

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:  
[https://github.com/discourse/discourse/pull/15919](https://github.com/discourse/discourse/pull/15919)

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](https://meta.discourse.org/t/failed-to-upgrade-discourse-instance-to-feb-15-2022/218204)  
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](https://www.baeldung.com/linux/process-peak-memory-usage) and there are some ideas [here](https://stackoverflow.com/questions/774556/peak-memory-usage-of-a-linux-unix-process) 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.

---

_[View the full topic](https://meta.discourse.org/t/ember-cli-build-memory-usage-risks-failure-oom-on-minimum-instance-size/245547)._
