Skip to content

node:sqlite - add "timeout" as an option for initializing DatabaseSync #57597

@topvis

Description

@topvis

What is the problem this feature will solve?

When a connection to sqlite database is created by node:sqlite's DatabaseSync, the default busy_timeout value is 0. I found this because I randomly encounter error "database is locked". I can run an SQL "PRAGMA busy_timeout = 1000;" to set the timeout to be 1s.

What is the feature you are proposing to solve the problem?

  1. make default value of timeout greater than 0, e.g., 1s or 2s.
  2. make "timeout" as an option when initializing DatabaseSync in new DatabaseSync(path[, options]).

What alternatives have you considered?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.sqliteIssues and PRs related to the SQLite subsystem.

    Type

    No type

    Projects

    Status

    Awaiting Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions