-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image
Description
I'm having very weird issue.
I limited my postgres to 20G of RAM.
Then used loads of config generators like https://pgtune.leopard.in.ua/ or http://pgconfigurator.cybertec.at/ to setup.
Always using 16GB of ram in generator.
And then few times a week some worker's getting killed by out of memory error and whole DB is getting restarted.
I heard much people are using this configurators and noone ever had similar issue, my friend suggested it may be problem with docker container.
This is my docker-compose.yml
:
version: '2.4'
services:
postgres:
image: postgres:13-alpine
restart: unless-stopped
stop_grace_period: 2m
networks:
- postgres
volumes:
- ./data/postgres:/var/lib/postgresql/data
mem_limit: 20G
cpus: 5.0
environment:
- POSTGRES_PASSWORD=<redacted>
- LANG=C
- POSTGRES_INITDB_ARGS="--encoding=UTF-8"
networks:
postgres:
name: postgres
internal: true
Metadata
Metadata
Assignees
Labels
questionUsability question, not directly related to an error with the imageUsability question, not directly related to an error with the image