From 23a608732b16ecde527953281e5d84e35db0929d Mon Sep 17 00:00:00 2001 From: wglambert Date: Thu, 11 Oct 2018 11:20:26 -0700 Subject: [PATCH] Notes on --shm-size https://github.com/docker-library/docs/issues/1318 --- postgres/content.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgres/content.md b/postgres/content.md index 2f0f794e4..c8bfdb99b 100644 --- a/postgres/content.md +++ b/postgres/content.md @@ -198,3 +198,5 @@ When using the Alpine variants, any postgres extension not listed in [postgres-c # Caveats If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker-compose`, that start several containers simultaneously. + +Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR: could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker-compose`](https://docs.docker.com/compose/compose-file/#shm_size)