Mount a 2 GiB memory-backed /dev/shm in workspaces #9

Merged
GuillaumeHemmen merged 1 commit from fix/dev-shm-for-jcef into master 2026-11-10 10:42:29 +00:00
Member

Workspaces get the container runtime default /dev/shm of 64 MB. JetBrains
IDEs run JCEF (the embedded Chromium) out of process: cef_server draws each
Markdown preview off screen and hands the frame buffers (about 7 MB each for
a full pane) to the IDE through /dev/shm. Once it fills, idea.log shows
Failed to initialize the Markdown preview with ERR_INSUFFICIENT_RESOURCES
and the preview renders blank or only partly.

Seen on the Beewise workspace (55 MB of 64 MB used). The personal workspace
has the same 64 MB mount, since both come from this template.

Change: an emptyDir with medium = "Memory" and size_limit = "2Gi"
mounted at /dev/shm. Memory-backed pages count against the container memory
limit only when written, so idle workspaces pay nothing.

Checked with terraform validate. Before pushing the template version to
Coder, diff the active Coder version's main.tf against master in case of
Coder-only edits. Workspaces pick it up on their next rebuild.

🤖 Generated with Claude Code

Workspaces get the container runtime default `/dev/shm` of 64 MB. JetBrains IDEs run JCEF (the embedded Chromium) out of process: `cef_server` draws each Markdown preview off screen and hands the frame buffers (about 7 MB each for a full pane) to the IDE through `/dev/shm`. Once it fills, `idea.log` shows `Failed to initialize the Markdown preview` with `ERR_INSUFFICIENT_RESOURCES` and the preview renders blank or only partly. Seen on the Beewise workspace (55 MB of 64 MB used). The personal workspace has the same 64 MB mount, since both come from this template. Change: an `emptyDir` with `medium = "Memory"` and `size_limit = "2Gi"` mounted at `/dev/shm`. Memory-backed pages count against the container memory limit only when written, so idle workspaces pay nothing. Checked with `terraform validate`. Before pushing the template version to Coder, diff the active Coder version's `main.tf` against master in case of Coder-only edits. Workspaces pick it up on their next rebuild. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The runtime default /dev/shm is 64 MB. JetBrains JCEF runs out of process
and passes its off-screen frame buffers through /dev/shm, so the Markdown
preview fails with ERR_INSUFFICIENT_RESOURCES once it fills and renders
blank or half drawn. Mount an emptyDir (medium Memory, size_limit 2Gi)
there instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuillaumeHemmen deleted branch fix/dev-shm-for-jcef 2026-11-10 10:42:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
GuillaumeHemmen-k8s/coder-sindri-deployment!9
No description provided.