# Rancher-compose ulimit setting

**URL:** <https://forums.suse.com/t/rancher-compose-ulimit-setting/2673>\
**Category:** Rancher 1.x\
**Created:** [May 3, 2016, 4:36pm UTC](https://forums.suse.com/t/rancher-compose-ulimit-setting/2673 "2016-05-03T16:36:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greensheep](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@greensheep](https://forums.suse.com/u/greensheep)\
**Post date:** [May 3, 2016, 4:36pm UTC](https://forums.suse.com/t/rancher-compose-ulimit-setting/2673/1 "2016-05-03T16:36:47Z")

</div>

I have a container configured with rancher-compose that I need to modify the ulimit for. According to the docker-compose documentation [1], this should be possible with the following:

```
ulimits:
  nofile:
    soft: 20000
    hard: 40000

```

Is this supported in Rancher? I added it to my docker-compose.yml file and used the CLI to create the stack but it had no effect. When I check the stack config from the UI, the ulimit part is missing. The same also happens if I paste my docker-compose file into the new stack UI.

[1] [https://docs.docker.com/compose/compose-file/#ulimits](https://docs.docker.com/compose/compose-file/#ulimits)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [May 6, 2016, 5:40am UTC](https://forums.suse.com/t/rancher-compose-ulimit-setting/2673/2 "2016-05-06T05:40:52Z")

</div>

Currently, this is not supported in Rancher today. There are a lot of settings that were introduced into docker-compose.yml that need support in docker/libcompose, which is what rancher-compose is based on. I’ve started an issue to track them down.

> <https://github.com/rancher/rancher/issues/4708>

---

<div class="post-metadata">

**Author:** ![greensheep](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@greensheep](https://forums.suse.com/u/greensheep)\
**Post date:** [May 6, 2016, 8:08am UTC](https://forums.suse.com/t/rancher-compose-ulimit-setting/2673/3 "2016-05-06T08:08:24Z")

</div>

Thanks for getting back to me, it sounds like this will eventually be supported which is great.

In the meantime, and for anyone else coming across this, I’ve worked around it by setting the `--default-ulimit` option on the Docker daemon. I have a provisioning script for my Rancher hosts so it was pretty straightforward but I believe it’s also possible in the UI under Advanced Options -\> Engine Options when adding a host?

---

<div class="post-metadata">

**Author:** ![FabienHenon](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/fabienhenon/32/2946_2.png) [@FabienHenon](https://forums.suse.com/u/FabienHenon)\
**Post date:** [October 18, 2017, 1:21pm UTC](https://forums.suse.com/t/rancher-compose-ulimit-setting/2673/4 "2017-10-18T13:21:07Z")

</div>

Can you provide more information on how you did to set the `ulimit`? I tried to access the host machine (Ubuntu 16) but I can’t figure out how to change the Docker Daemon to set the `ulimit`
