Configuring the JVM Heap Size
On This Page
|CircleCI server version 2.x is no longer supported, and will cease to function at the end of March, 2023. Please contact your account team for support in upgrading to a supported release.|
The JVM heap size is configurable for the following containers:
contexts-service. You might want to consider increasing the heap size if you see "out of memory" errors, such as:
Terminating due to java.lang.OutOfMemoryError: Java heap space.
To be able to configure the JVM_HEAP_SIZE value for each container, you will first need to create customizations files on your services machine.
Create customizations files:
/etc/circleconfig/frontend/customizations /etc/circleconfig/test-results/customizations /etc/circleconfig/output-processor/customizations /etc/circleconfig/contexts-service/customizations
In each customization file add the line below to export your desired JVM heap size:
Stop and restart CircleCI application from the Management Console dashboard (for example, your-circleci-hostname.com:8800)
Verify customization is applied
Once your installation has successfully restarted, you can confirm the configured value was applied correctly by running the following REPL commands per container:
sudo docker exec -it frontend lein repl :connect 6005
sudo docker exec -it test-results lein repl :connect 2719
sudo docker exec -it picard-output-processor lein repl :connect 6007
And following are the outputs you should see:
(System/getenv "JVM_HEAP_SIZE") ;; should return what you have set above
(-> (java.lang.Runtime/getRuntime) (.maxMemory)) ;; return value should match with JVM_HEAP_SIZE
Help make this document better
This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.
- Suggest an edit to this page (please read the contributing guide first).
- To report a problem in the documentation, or to submit feedback and comments, please open an issue on GitHub.
- CircleCI is always seeking ways to improve your experience with our platform. If you would like to share feedback, please join our research community.
Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.
You can also visit our support site to find support articles, community forums, and training resources.
CircleCI Documentation by CircleCI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.