Increase database's shared memory size in Docker Compose configuration #5468
Closed
Amaimersion
started this conversation in
Feature requests
Replies: 2 comments 6 replies
-
Thank you for the detailed suggestion @Amaimersion. Let me brainstorm this with the team and get back to you. |
Beta Was this translation helpful? Give feedback.
4 replies
-
PR #5541 merged, so I'm closing this. Thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm self-hosting RudderStack backend using Docker Compose. My
docker-compose.yml
is similar to official one:Recently I noticed that sometimes the container crashes with following error:
The key message is
pq: could not resize shared memory segment. No space left on device
. Quick googling indicates that the problem is related to default low size of shared memory in a Docker container, which is 64MB. I increased it to 1GB by settingshm_size: 1g
and the problem has gone.Noteworthy, official Postgres Docker configuration increases shared memory right from the beginning by setting it to 128MB:
I'm proposing that RudderStack default Docker Compose configuration will ship with increased shared memory for database. Default may be kept low enough. The key thing is to indicate that this setting can be (and maybe worth be) increased.
So instead of:
use:
Also consider if 128MB is good enough for default value. I'd rather to use 256MB just to make sure that there will be enough memory for the shared cache.
Beta Was this translation helpful? Give feedback.
All reactions