# Is cgroup isolation for Discourse supported?

**URL:** https://meta.discourse.org/t/is-cgroup-isolation-for-discourse-supported/18031
**Category:** Self-hosting
**Tags:** hosting
**Created:** [July 25, 2014, 5:54am UTC](https://meta.discourse.org/t/is-cgroup-isolation-for-discourse-supported/18031 "2014-07-25T05:54:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jaryd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaryd/32/122142_2.png) [@jaryd](https://meta.discourse.org/u/jaryd)
#### Post date: [July 25, 2014, 5:54am UTC](https://meta.discourse.org/t/is-cgroup-isolation-for-discourse-supported/18031/1 "2014-07-25T05:54:32Z")

</div>

This might not be totally necessary but I’m wondering if I can limit how much physical memory the Discourse Docker container can utilize using LXC `cgroups`. I’m noticing a gradual memory leak on my server and am not 100% sure where it is at this point:

![](https://global.discourse-cdn.com/meta/original/3X/3/4/3494e312ef9b3c393e74a4673df42ab0ebd630f3.png)

Pinning down the leak might be a bit easier if I can certifiably know that the Docker container is hard-limited by the kernel.

As a side note, the server is not currently live and has absolutely no traffic.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [July 25, 2014, 6:26am UTC](https://meta.discourse.org/t/is-cgroup-isolation-for-discourse-supported/18031/2 "2014-07-25T06:26:12Z")

</div>

Its a docker feature and supported by docker, I see no reason you could not set up your server to limit memory a container is allowed to consume.

---

<div class="post-metadata">

### Author: ![jaryd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaryd/32/122142_2.png) [@jaryd](https://meta.discourse.org/u/jaryd)
#### Post date: [July 25, 2014, 6:39am UTC](https://meta.discourse.org/t/is-cgroup-isolation-for-discourse-supported/18031/3 "2014-07-25T06:39:30Z")

</div>

Sweet! I figured as much but thought that I’d ask anyway. Thanks @sam 🙂
