Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21187

Add UI option to limit memory consumption for RSS containers in Bamboo

    • 1
    • 2
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Problem Definition

      Currently there's no way to set a memory limit for RSS containers

      Suggested Solution

      Add option to to limit the memory for a RSS containers

      Why this is important

      It's possible that a malicious code can consume all system available memory and eventually bring down the instance.

      Workaround

      Set a limit in Docker

      1. cat /etc/systemd/system/docker_limit.slice 
        [Unit]
        Description=Slice that limits docker resources
        Before=slices.target
        
        [Slice]
        CPUAccounting=true
        CPUQuota=90%
        MemoryAccounting=true
        MemoryHigh=1G
        MemoryMax=1.2G
        
      2. cat /etc/docker/daemon.json
        {
            "exec-opts": ["native.cgroupdriver=systemd"],
            "cgroup-parent": "docker_limit.slice"
        }
        

      Additionally you can limit Maven's heap size

      • Create a .mvn/jvm.config in the repository stored spec:
        example
        -Xmx128m -Xms128m
        

            [BAM-21187] Add UI option to limit memory consumption for RSS containers in Bamboo

            SET Analytics Bot made changes -
            Support reference count New: 2
            SET Analytics Bot made changes -
            UIS Original: 12 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 12
            SET Analytics Bot made changes -
            UIS Original: 0 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            UIS Original: 2 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 2
            SET Analytics Bot made changes -
            UIS Original: 12 New: 1
            SET Analytics Bot made changes -
            UIS Original: 1 New: 12
            SET Analytics Bot made changes -
            UIS New: 1

              Unassigned Unassigned
              roliveira@atlassian.com Ricardo
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: