Start Building for Free

Configuring the JVM Heap Size

Server v2.x
Server Admin
On This Page
  • Setting up
  • Verify customization is applied

The JVM heap size is configurable for the following containers: frontend, test-results, output-processing and 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.

Setting up

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.

  1. Create customizations files:

  2. In each customization file add the line below to export your desired JVM heap size:

    export JVM_HEAP_SIZE=2g
  3. Stop and restart CircleCI application from the Management Console dashboard (for example,

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:

  • frontend

    sudo docker exec -it frontend lein repl :connect 6005
  • test-results

    sudo docker exec -it test-results lein repl :connect 2719
  • output-processing

    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.

Need support?

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.