Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to set different Docker memory limit for each step?

Our pipeline consist of dozen steps and one step which builds next.js production docker image requires a lot of memory. So I added size: x2 to options section of bitbucket-pipelines.yml file and set definitions.services.docker.memory to 4096. Everything works but now all my steps are x2, I can't set x1 to other steps when I set x1 pipeline throws an error:
A step does not have the minimum resources needed to run (1024 MB). Services on the current step are consuming 4096 MB

It looks like docker memory limit is set on all steps and I only need it once. How can I give 4096MB to docker service only to one step in pipeline?

1 answer

1 accepted

0 votes
Answer accepted

Hi @Bogdan and welcome to the community.

While it is possible to set the 2x option for a specific step only, as follows:

- step:
size: 2x # Double resources available for this step.
script:
- echo "Build step"

I'm afraid that it is not possible to set different service memory for different steps. If you set the service's memory to 4096 MB, this will apply for any step where the service is used.

If you're using the docker service only in the step that requires a lot of memory, you could add the 2x option only for this step. However, if the docker service is used by other steps without the 2x option, then you will get an error.

If the service needs 4096 MB memory and it is used in more than one steps, then you'd need the 2x option in all the steps where the service is used.

We have a feature request to allow users to configure memory for services on a step level:

If you'd be interested in that, I would suggest that you add your vote in that feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates will be posted in the feature request.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across Jira Cloud instance.   📢 Get y...

122 views 6 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you