I am trying to add the docker service to a bitbucket pipeline step. However, with the default memory allocation of 1gb, this service takes away too much space from the Build container, which runs out of memory (for whatever reason, this only happens sometimes). Reducing the docker service size to 512 mb mitigates the issue, but causes other pipeline steps which rely on docker to fail due to the docker service container exceeding memory.
My understanding is that it is currently impossible to specify the memory for a service on a step-by-step basis. Nonetheless, I was hoping that somebody here might be able to offer a workaround.
The pipeline step under question runs ./gradlew clean build --parallel and has 2x memory allocated (so 8 gb). And org.gradle.jvmargs in gradle.properties is
-Xmx3g -XX:MetaspaceSize=100m -XX:MaxPermSize=1g -Duser.country=US -Duser.language=en
When I run gradle with --parallel locally, it appears to spawn multiple java processes, so I am suspecting that the same happens in the build container and causes it to hog so much memory. I am still confused by this, since according to the documentation the build container is only supposed to be using up 1 gb.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
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