Shared memory warnings

docker
memory-usage

#1

I’m getting these warnings regarding shared memory, and I’m not sure what to do. This happens when the tests run, and then the tests fail with no obvious error and exit code 1. When running locally (using circleci build) these warnings show, but the tests eventually complete.

Warning: space is running low in /dev/shm (shm) threshold=167,772,160 usable=161,402,880
Warning: space is running low in /dev/shm (shm) threshold=167,772,160 usable=111,067,136
Warning: space is running low in /dev/shm (shm) threshold=167,772,160 usable=60,731,392

#2

That’s curious! Can you link to builds where you’re seeing that?


#3

Sure: https://circleci.com/gh/clubhouse/pipeline/22


#4

We raised the shm size over the weekend. Can you try running new builds?


#5

Thanks! The shm warnings have gone away. But my tests are still failing without a reason. I updated the CLI and ran the tests locally, and the shm warnings no longer show up there either, but the tests did pass. Is there any way I can get more insight on what’s happening?


#6

Can you try setting Java args like Xmx to restrict the memory usage? Maybe the JVM is trying to allocate too much RAM.


#7

What’s the memory limit for 2.0?

I set -Xmx4g -XX:+HeapDumpOnOutOfMemoryError, and still nothing useful is printing.


#8

It’s 2 cores, 4 GB of RAM but letting it use 4GB will probably OOM you.


#9