Skip to content

docs: size shared memory for your own PostgreSQL container - #45

Merged
zZebrahz merged 2 commits into
Silo-Server:mainfrom
Tobechukwu-Njoku:docs/postgres-shared-memory
Sep 29, 2026
Merged

zZebrahz merged 2 commits into
Silo-Server:mainfrom
Tobechukwu-Njoku:docs/postgres-shared-memory

Conversation

@Tobechukwu-Njoku

@Tobechukwu-Njoku Tobechukwu-Njoku commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A — narrow fix

An admin who runs PostgreSQL in their own Docker container can hit shared memory errors that the manual doesn't mention. The bundled postgres service raises /dev/shm through POSTGRES_SHM_SIZE, but a container the admin creates keeps Docker's 64 MB default. Parallel catalog queries then fail with SQLSTATE 53100 while Silo keeps running and the disk has free space, and the error names neither Docker nor shared memory.

Approach

Add a subsection to External PostgreSQL and Redis, which the Docker page links to for external databases. It shows the error, the Compose and docker run settings, and what to check when PostgreSQL runs directly on a host.

The text comes from Silo-Server/silo-server#1513, including the maintainer's corrections there. That PR was closed so operator guides could move to the manual.

Validation

Source reviewed. At the manual's baseline revision cb0b8b75, silo-server's docker-compose.yml sets shm_size: ${POSTGRES_SHM_SIZE:-8gb} on the bundled postgres service, and .env.example sets POSTGRES_SHM_SIZE=8gb. The error text was taken from a self-hosted server whose PostgreSQL container ran with Docker's default /dev/shm.

$ bun run test:docs
ℹ tests 8  ℹ pass 8  ℹ fail 0
$ bun run build
[build] Complete!

Checked the rendered section with astro preview at 375 px: the page doesn't scroll horizontally, the error block scrolls inside its own box like the page's other code blocks, and the new #shared-memory-for-your-own-postgresql-container anchor resolves.

Risks

None identified. Documentation only.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

Note

Document /dev/shm sizing for user-managed PostgreSQL containers

Adds a section to the PostgreSQL configuration docs covering shared memory sizing. It includes Docker Compose and docker run examples for setting /dev/shm, documents the bundled service's POSTGRES_SHM_SIZE default, and explains the difference between a tmpfs limit and startup allocation, plus the PostgreSQL error that appears when the limit is too small. See configuration.md.

Macroscope summarized cb78184.

The bundled postgres service raises /dev/shm through POSTGRES_SHM_SIZE,
but a PostgreSQL container the admin runs themselves keeps Docker's 64 MB
default. Parallel catalog queries can then fail with SQLSTATE 53100 while
the server stays up and the disk has room, and the error names neither
Docker nor shared memory. Add the symptom and the fix to the External
PostgreSQL and Redis section, moved here from
Silo-Server/silo-server#1513.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 37de446b-5cb6-47d7-b555-8fe8c224dc2f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kody-ai

kody-ai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@kody-ai

kody-ai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@zZebrahz

Copy link
Copy Markdown
Contributor

Thanks for porting this from silo-server#1513!

I pushed cb78184 on top of yours. It moves the setup step to the top of the section, since the rest of this page leads with what to do, and puts the error message after it for anyone searching for it. It also replaces "Choose a size that fits your workload" with the bundled 8gb as a starting point. The wording is otherwise yours.

@zZebrahz
zZebrahz merged commit d4bb29c into Silo-Server:main Sep 29, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

Preview removed after this pull request was closed.

This branch was previously deployed

1 inactive deployment
Preview — cb781840 Deployed Sep 29, 2026 by zZebrahz via teardown #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants