Native stack engine: macOS runs out of shared memory segments after about 30 running stacks
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- macos, postgresql, typescript
Rechercherichtung
Start by tracing the native stack startup path and how it handles Postgres startup failures, especially shmget errors; the issue does not name the relevant files or tests. The report describes three possible improvements: make the error actionable, stop idle Postgres instances, or clean up stacks for removed branches. Clarify which behavior is intended and how it should be verified before implementation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
On macOS, the native stack engine runs out of System V shared memory segments once about 30 stacks are running, and supabase start then fails for every new checkout or branch.
What happens
The stack engine keeps one stack per checkout and branch, and a stack keeps running after its shell exits. Each running stack's Postgres creates a System V shared memory segment. macOS allows 32 segments on the whole machine by default (sysctl kern.sysv.shmmni prints 32), so with git worktrees and short-lived branches the limit is reached in a few days. ipcs -m shows the segments in use; on my machine 31 of 32 were taken before I stopped two stacks.
Steps to reproduce
- On macOS, set
[experimental] stack = trueinsupabase/config.toml. - Run
supabase start --runtime nativein about 30 worktrees or branches without stopping them. - Run
supabase start --runtime nativein one more.
The last start fails because Postgres can't create its segment. supabase stack list shows the other stacks as reachable.
Environment
- Supabase CLI 2.121.0, native runtime
- macOS 26 (Darwin 25.6), Apple silicon
kern.sysv.shmmni: 32
Suggestions
- Name the cause when Postgres fails on
shmget, and point tosupabase stack listandsupabase stop --stack-id. - Stop the Postgres of a stack that has been idle for a while, the way the other services already stop when idle.
- Offer a command that stops the stacks of branches that no longer exist or were merged. We use a small script for this today: it reads
supabase stack list --output-format json, matchesbranch_contextagainstgit branch --merged mainfor the repo and its worktrees, and callssupabase stop --stack-id.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.4k
- Forks
- 540
- Ø Merge
- 17 Std. 29 Min.
- Gemergte PRs (30 T.)
- 387
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus supabase/cli
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen✨ Feature supabase/cli
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
Maintainer antworten meist innerhalb von 1 Tag
-
`supabase start` waits about 10 seconds for Docker's first health check after services are readyOffen🐛 Bug supabase/cli
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 70/100
Maintainer antworten meist innerhalb von 1 Tag
-
🐛 Bug supabase/cli
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
Maintainer antworten meist innerhalb von 1 Tag
-
stack: every Edge Function request starts a new worker, so the same function never reuses one and each call pays a cold startEvtl. vergeben @7ttp hat das vor 4 Tagen übernommen. Offen🐛 Bug supabase/cli
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
supabase/cli#7274 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Explicit local function bundling falls back to API bundling when Docker is unavailableEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen🐛 Bug open-for-contribution supabase/cli
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
supabase/cli#7214 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Slaymish/HealthAgent#7 ·
-
area: engine topic: math type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
Get-Concord-AI/concord-mcp#310 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Correct install_claude: 'marketplace add' over a different source is refused, not replaced in placeOffentype:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
nightgauge/nightgauge#2804 ·
Maintainer antworten meist innerhalb von 1 Tag