mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
The db-wal file is too large #1322
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#1322
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 @AnnAngela on GitHub (Aug 8, 2022).
⚠️ Please verify that this bug has NOT been raised before.
🛡️ Security Policy
📝 Describe your problem
I run a uptime-kuma instance in docker using docker
louislam/uptime-kuma:1image.After running the instance for a long time, I found out that the
db-walfile is too large:Is there any way to suppress it?
🐻 Uptime-Kuma Version
1.17.1
💻 Operating System and Arch
Ubuntu 20.04.4 LTS x64
🌐 Browser
Microsoft Edge 103.0.1264.77 x64
🐋 Docker Version
Docker version 20.10.17, build 100c701
🟩 NodeJS Version
v16.15.0
@louislam commented on GitHub (Aug 8, 2022):
How many monitors do you have?
You can keep fewer history to save disk space.
@AnnAngela commented on GitHub (Aug 8, 2022):
@louislam I have 8 monitor with 180 days period, I'm just curious, can the sqlite control the size of it's wal log
@louislam commented on GitHub (Aug 8, 2022):
If your database created before 1.10.0, you may need to click "Shrink Database" in order to to shrink the wal size.
@AnnAngela commented on GitHub (Aug 13, 2022):
@louislam Sorry for late response, I tried but not help. I learned from Stackoverflow that the wal log file should not be large since when the lines of logs hit limit, sqlite should write the logs back to main file and write the log to the head of wal log file. IDK if there is a problem or just my misunderstanding.
@louislam commented on GitHub (Aug 13, 2022):
Not sure what is happening. Could you try to shutdown the container gratefully, after it is stopped, see if the wal file merge back to the main database file.
For your reference, my instance with 17 monitors is running for over a year. The wal file is small.
@AnnAngela commented on GitHub (Aug 13, 2022):
After gratefully restart, the problem disappeared. Really strange, sorry for wasting your time, I will close this issue and keep an eyes on the size, and open another issue if it go large again.
@strarsis commented on GitHub (Mar 21, 2023):
I have the same issue, a very large
.db-walfile.kuma.dbis large (which is expected) (1.2 GB), but thekuma.db-walalso (also around 1.2 GB!).Can I let
uptime-kumaregenerate thekuma.db-walfile to get it back small?I also already restarted
uptime-kumamultiple times.@fredskis commented on GitHub (Apr 9, 2023):
I'm troubleshooting my instance, running the latest version (1.21.2), changed my monitor history down to 30 days from 180 and tried the Shrink Database button.
I was alerted to this because my docker host had run out of storage space, then I found the Uptime Kuma volume was using >20GB!
I was able to get it back down to 9.6GB with the Shrink Database button, now /app/data/kuma.db is only 27MB but there are still other large files:
/app/data/kuma.db-wal @ 2.1GB
and 3 other .bak files at similar sizes.
How do I gracefully restart the container?
I've tried
docker stop uptime-kumafollowed bydocker compose up -dbut this doesn't help. Is there a command I can send from inside the container?Edit: okay, the kuma.db-wal file is now only 1.3M but the .bak files are still crazy sizes, I'm going to assume they can safely be deleted. #1671
Is this a past bug that is now fixed?
@louislam commented on GitHub (Apr 10, 2023):
Yes, .bak files can be deleted.