# Rancher/Server Heap Size

**URL:** <https://forums.suse.com/t/rancher-server-heap-size/8123>\
**Category:** Rancher 1.x\
**Created:** [December 30, 2017, 4:53am UTC](https://forums.suse.com/t/rancher-server-heap-size/8123 "2017-12-30T04:53:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phang](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/phang/32/3163_2.png) [@Phang](https://forums.suse.com/u/Phang)\
**Post date:** [December 30, 2017, 4:53am UTC](https://forums.suse.com/t/rancher-server-heap-size/8123/1 "2017-12-30T04:53:50Z")

</div>

Hi there,  
To increase the heap size of Rancher/server by passing in the -e JAVA\_OPTS="-Xms2048m -Xmx2048m" when running the rancher/server container.  
Question here is how to increase after I have deployed my rancher/server ?

Many Thanks

---

<div class="post-metadata">

**Author:** ![Phang](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/phang/32/3163_2.png) [@Phang](https://forums.suse.com/u/Phang)\
**Post date:** [December 30, 2017, 5:17am UTC](https://forums.suse.com/t/rancher-server-heap-size/8123/2 "2017-12-30T05:17:48Z")

</div>

Look like passing in the heap size using the following  
docker run -d --restart=unless-stopped -p 8080:8080 -p 9345:9345 -e JAVA\_OPTS="-Xms2048m -Xmx2048m" rancher/server:stable …(other parameter)

Result in getting two set of -Xms and -Xmx  
java -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xms128m -Xmx4g … bootstrap.level=WARN -Xms4096m -Xmx16384m …

How to set heap size for production deployment??

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [December 30, 2017, 7:53am UTC](https://forums.suse.com/t/rancher-server-heap-size/8123/3 "2017-12-30T07:53:23Z")

</div>

The -e has to go before the image… everything after the image is arguments to the entrypoint, not arguments to docker.
