Skip to content

Running vacuum on built-in DB fails due to Docker's low shared memory limit #1147

@yanokwa

Description

@yanokwa

After upgrading to v2025.1.3, I attempted to run a vacuum on the built-in DB and it faled with...

"ERROR: could not resize shared memory segment "/PostgreSQL.1712702934" to 67145184 bytes: No space left on device"

By default, Docker limits the size of /dev/shm to 64MB, which is small for PostgreSQL. After I bumped it up to 512MB in docker-compose.yml, the vacuum worked great.

services:
  postgres14:
    build:
      context: .
      dockerfile: postgres14.dockerfile
    shm_size: 512m
    volumes:
      - postgres14:/var/lib/odk/postgresql/14

I settled on 512MB because ChatGPT says that's what a real app with a light load would need. You can do more but you are likely overcommitting resources...

Metadata

Metadata

Assignees

No one assigned

    Labels

    opsDocker, nginx, ops to deploy Central

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions