mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Can't clear statistics - "The pool is probably full. Are you missing a .transacting(trx) call?" #4016
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#4016
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 @patienttruth on GitHub (Mar 4, 2025).
⚠️ Please verify that this question has NOT been raised before.
🛡️ Security Policy
📝 Describe your problem
I'm trying to remove old history as my .db file is quite large (retention was set at 180 days which is more than I need). Though Uptime Kuma appeared functional I was getting corrupted database errors when I clicked "Settings > Monitor History > Clear All Statistics". I'm sure that was caused by a couple times I've let me HD run out of space over the past few months. I used sqlite3 to recover the database, however now I'm getting the following error
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?when I try clear statistics.Any suggestions?
Thanks in advance for any assistance and for the excellent project that has been quite useful in keeping me informed about homelab status.
📝 Error Message(s) or Log
Log
``` 2025-03-04T22:11:50Z [MANAGE] INFO: Clear Statistics User ID: 12025-03-04T22:12:00Z [RATE-LIMIT] INFO: remaining requests: 60
2025-03-04T22:12:21Z [RATE-LIMIT] INFO: remaining requests: 60
2025-03-04T22:12:42Z [RATE-LIMIT] INFO: remaining requests: 60
2025-03-04T22:13:03Z [RATE-LIMIT] INFO: remaining requests: 60
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
sql: undefined,
bindings: undefined
}
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
2025-03-04T22:14:04Z [MONITOR] WARN: Monitor #19 'Far Garage Door Opener': Pending: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? | Max retries: 2 | Retry: 1 | Retry Interval: 20 seconds | Type: ping
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
sql: undefined,
bindings: undefined
}
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
sql: undefined,
bindings: undefined
}
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
sql: undefined,
bindings: undefined
}
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
2025-03-04T22:15:23Z [MANAGE] INFO: Clear Events Monitor: 22 User ID: 1
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
sql: 'SELECT
valueFROM setting WHEREkey= ? limit ?',bindings: [ 'disableAuth', 1 ]
}
If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
@Jezza34000 commented on GitHub (Mar 6, 2025):
+1
@patienttruth commented on GitHub (Mar 6, 2025):
@Jezza34000 what I did, and maybe this will help you is:
cp kuma.db kuma.db.bak- make backupsqlite3 kuma.db .recovery >data.sql- recover db to recovery filesqlite3 kuma.db <data.sql- restore recovered data to database file.Then I opened the file with https://sqlitestudio.pl/ and deleted the data in the heartbeat array.
That solved my corrupt database problem as well as the database size problem. Then I set my history retention to a day or two. Hope this helps!
Edit to add:
You need to have write permissions for the directory where kuma.db is located. You can just use
sudoas sqlite3 makes temp files when it has the .db open to recover it, and it won't work if you don't have write permissions. Probably took me 30-45 mins to figure that out. Justchown -Rthe folder to you, and then to whatever it was when you're done