mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Allow admin to set journal_size_limit to set wal file size limit #3953
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3953
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cfouche3005 on GitHub (Feb 4, 2025).
📑 I have found these related issues/pull requests
🏷️ Feature Request Type
Settings
🔖 Feature description
On some cloud provider (eg Fly.io) volume size are extremely limited (eg 1GB).
The problem with sqlite is that although the db size is very small (the issue is written with the v2 context and the new aggregated tables), the wal file can grow to unreasonable size (especially after VACUUM operations).
This behavior is not a bug but a feature of the WAL of sqlite as explained in the sqlite documentation
The problem is that (as specified in section 6 of the WAL documentation), the wal file is not truncated after a checkpoint unless journal_size_limit is set (see this). By default it's set to -1 (no limit)
✔️ Solution
Expose and option to set the journal_size_limit on all of the sqlite databases used by Uptime-Kuma ( PRAGMA schema.journal_size_limit = N ; only set the journal_size_limit for a db not the entire file and I don't know if uptime-kuma use multiple database in one file, ether way, this option should be set to all db).
This option doesn't need to be in the ui, it can be an env variable or an option in the db config file
❓ Alternatives
No response
📝 Additional Context
No response
@CommanderStorm commented on GitHub (Apr 15, 2025):
setting this statically to something reasonably large is something that I would merge.
I don't think that something this specsific needs a configuration option
What do you tthink?