Add SHM (shared memory) size configuration for database services
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
Description
When using PostgreSQL (and potentially other database services) in Dokploy, there is no way to configure the shm_size (shared memory size) for the container. This causes issues like:
pq: could not resize shared memory segment: No space left on device
Context
Originally raised in the Dokploy Discord community: https://www.answeroverflow.com/m/1311331481817317499
By default, Docker containers get a very small /dev/shm (64MB). PostgreSQL uses shared memory for operations like sorting, hashing, and parallel queries. When the default is too small, queries fail with "No space left on device" errors.
Docker Compose supports shm_size as a service-level option, and docker run supports --shm-size. Dokploy should expose this setting for database services (Postgres, MySQL, MariaDB, MongoDB, Redis) so users can configure it as needed.
Expected behavior
Users should be able to set shm_size for database services through the Dokploy UI (e.g., in the Advanced settings / Resources section).
Note
I'm going to work on this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how database service settings are represented and how Docker Compose or container configuration is generated, then inspect the UI's Advanced settings or Resources section. Done means users can set shm_size for the listed database services and the value reaches their containers; check the existing database configuration tests or run the relevant test suite if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mariadb, mongodb, mysql, postgresql, redis, typescript
- Domain
- databases, devops, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 43/100