Why does my build require more RAM than locally?

Under certain circumstances it may appear that jobs will use more RAM than expected, causing a build failure, likely resulting in the exit code 137. If your project utilizes the JVM, we have a great blog post detailing how to limit the memory usage of the JVM.

Also, check to see what and how many service containers your project is utilizing. Additional service containers such as postgres or mysql, these containers share the resources with your primary container.

Lastly, when Linux runs out of available memory, memory page files will be copied to disk in swap space. On CircleCI since we limit memory usage, once you approach this limit the build will be killed, it will not have the chance to utilize swap space. Your local build may be benefitting from the "effectively" additional RAM given by swap space.

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.