fix(database): add UPTIME_KUMA_SQLITE_SINGLE_CONNECTION#7312
Open
fix(database): add UPTIME_KUMA_SQLITE_SINGLE_CONNECTION#7312
UPTIME_KUMA_SQLITE_SINGLE_CONNECTION#7312Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in environment variable to force SQLite to use a single Knex pool connection, intended to mitigate SQLITE_BUSY: database is locked issues reported on some Raspberry Pi/SD-card setups.
Changes:
- Introduces
UPTIME_KUMA_SQLITE_SINGLE_CONNECTIONto switch SQLite pool config from{ min: 0, max: 20 }to{ min: 1, max: 1 }. - Refactors SQLite pool configuration to use a shared
poolConfigobject and spread it into the Knexpoolconfig.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CommanderStorm
approved these changes
Apr 24, 2026
Collaborator
CommanderStorm
left a comment
There was a problem hiding this comment.
not a fan.. grumpf
Owner
Author
|
Indeed, but I think it is the only solution for Pi users for now. I wish we could find an universal solution with this env var. |
Collaborator
|
I don't think that supporting EMMC is reasonable tbh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SQLITE_BUSY: database is lockederrors #7289Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
UPDOWN