GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Concurrent opencode processes on one database fail prompts with "Failed to execute statement" (SQLITE_BUSY) · Issue #47566 · anomalyco/opencode

Concurrent opencode processes on one database fail prompts with "Failed to execute statement" (SQLITE_BUSY) #47566

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Concurrent opencode processes on one database fail prompts with "Failed to execute statement" (SQLITE_BUSY)#47566
Copy link
Assignees
rekram1-node

Description

@woodsonl
woodsonl
opened on Sep 6, 2026
Issue body actions

Description

Running several opencode processes against the same shared data directory makes them contend for the single SQLite write lock. Statements that wait longer than busy_timeout (5s) fail with database is locked and the error propagates as "Failed to execute statement" / "Unexpected server error", killing the whole prompt even though the statement itself is fine and would succeed on retry.

Observed on a busy VM with ~10 concurrent sessions sharing one opencode.db: 43 lock failures in one day, at Session.updateMessage, createUserMessage, and cleanup paths.

Steps to reproduce

  1. Start multiple long-running opencode sessions writing to the same opencode.db (WAL mode)
  2. Prompt them concurrently under enough IO/CPU load that some writes exceed 5s
  3. Watch server log for SqlError/LockTimeoutError: database is locked and failed prompts

OpenCode version

1.18.29

Reacted by Nathan Clonts, Ian Qvist and Snowdon Dev

Activity

  1. github-actions
    assigned
    rekram1-node
    on Sep 6, 2026
  2. github-actions commented on Sep 6, 2026

    @github-actions
    github-actionsBot
    on Sep 6, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • Concurrent opencode run workers can fail at startup with database is locked #33320: Concurrent opencode run workers can fail at startup with database is locked — same SQLITE_BUSY contention on the shared database, same "Unexpected error" / lock failure symptom
    • Concurrent VS Code instances still silently crash — busy_timeout=0 still present #38849: Concurrent VS Code instances silently crash due to busy_timeout=0 — discusses the root cause (busy_timeout too low) and references the 5000ms stopgap fix that is directly relevant here
  3. woodsonl commented on Sep 6, 2026

    @woodsonl
    woodsonl
    on Sep 6, 2026
    Author
    More actions

    Opened #47567 for the mid-session write path (retry SQLITE_BUSY with backoff in both drivers). Complements #44558, which covers init/migrations — that PR explicitly leaves these runtime failures open. Happy to close or rework #47567 if the fix is being handled differently.

  4. thdxr commented on Oct 11, 2026

    @thdxr
    thdxr
    on Oct 11, 2026
    Member
    More actions

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  5. thdxr
    closed this as not plannedon Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.