Using overcommit_memory = 2 crashes a Postgres container
1
vote
0
answers
101
views
I have a device that has Debian 11 installed, on which Docker is running.
On boot, it starts the Docker Daemon and the nine containers.
Eight of them are executing a C# program and the last one is a Postgres one.
If I add
vm.overcommit_memory = 2
to /etc/sysctl.conf
and reboot the device,
only the Postgres container starts.
After, I did these steps:
- docker-compose down
- Set vm.overcommit_memory = 2
- reboot
- docker-compose up -d
Now, the first container, the Postgres one, fails to start with this error:
>ERROR: for StargatePostgres Cannot start service postgres: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 2, stdout: , stderr: fatal error: out of memory allocating heap arena map
There is enough memory, that's for sure:
free -m
total used free shared buff/cache available
Mem: 3603 534 2557 20 511 2910
Asked by Master DJon
(111 rep)
Jul 25, 2024, 01:56 AM
Last activity: Jul 28, 2024, 04:58 PM
Last activity: Jul 28, 2024, 04:58 PM