-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Description
π I have found these related issues/pull requests
Possibly related to #6331 and #6166 , but those seem to be related to acquiring a database connection in general, not pooling issues
π‘οΈ Security Policy
- I have read and agree to Uptime Kuma's Security Policy.
π Description
Hello,
We upgraded to v2 about 8 weeks ago and since then, about once or twice a week all of our monitors will start cascading with DOWN reports and the message Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?. After a minute or two, they all start coming back UP.
Again, it's not constant nor predictable, just randomly seems to happen. Though, it does seem to be occuring a little more frequently the longer we've been running v2. We do have quite a few monitors (~124) so wondering if it's some kind of leaky connection or missing transaction flush?
Thanks so much for any help you can provide
π Reproduction steps
A bit difficult to reproduce since it doesn't seem to be tied to any specific action. We just have to wait until it springs up again π€·ββοΈ
π Expected behavior
Monitors will not report DOWN if this happens
π Actual Behavior
All monitors report DOWN and then come back UP after a few minutes
π» Uptime-Kuma Version
2.0.0
π» Operating System and Arch
Ubuntu Server LTS 22.10
π Browser
Google Chrome Version 143.0.7499.42 (Official Build) (64-bit)
π₯οΈ Deployment Environment
- Runtime Environment:
- Docker: Version
24.0.5, buildced0996 - Docker Compose: Version
2.20.2 - Portainer (BE/CE): N/A
- MariaDB: N/A
- Node.js: N/A (Docker)
- Kubernetes: N/A
- Docker: Version
- Database:
- SQLite: Embedded
- Database Storage:
- Filesystem:
- Linux: ext4
- Storage Medium: SSD
- Filesystem:
- Uptime Kuma Setup:
- Number of monitors:
124
- Number of monitors:
π Relevant log output
2025-12-12T13:15:48-08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2025-12-12T13:15:48-08:00 [MONITOR] INFO: Try to restart the monitor
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:332:26)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processTimers (node:internal/timers:516:9)
at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:305:28)
at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
at async RedBeanNode.storeCore (/app/node_modules/redbean-node/dist/redbean-node.js:141:17)
at async RedBeanNode.store (/app/node_modules/redbean-node/dist/redbean-node.js:110:20)
at async UptimeCalculator.update (/app/server/uptime-calculator.js:309:9)
at async beat (/app/server/model/monitor.js:979:32)
at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1019:17) {
sql: undefined,
bindings: undefined
}
at Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1021:25)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processTimers (node:internal/timers:516:9)
2025-12-12T13:15:48-08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2025-12-12T13:15:48-08:00 [MONITOR] INFO: Try to restart the monitor
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:332:26)
at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:305:28)
at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
at async RedBeanNode.storeCore (/app/node_modules/redbean-node/dist/redbean-node.js:141:17)
at async RedBeanNode.store (/app/node_modules/redbean-node/dist/redbean-node.js:110:20)
at async UptimeCalculator.update (/app/server/uptime-calculator.js:309:9)
at async beat (/app/server/model/monitor.js:979:32)
at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1019:17) {
sql: undefined,
bindings: undefined
}
at Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1021:25)
2025-12-12T13:15:48-08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2025-12-12T13:15:49-08:00 [MONITOR] INFO: Try to restart the monitor
2025-12-12T13:17:40-08:00 [MONITOR] ERROR: Cannot send notification to Email Alert Service
2025-12-12T13:17:41-08:00 [MONITOR] ERROR: Error: write EPIPE
at afterWriteDispatched (node:internal/stream_base_commons:161:15)
at writeGeneric (node:internal/stream_base_commons:152:3)
at Socket._writeGeneric (node:net:958:11)
at Socket._write (node:net:970:8)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writable.write (node:internal/streams/writable:510:10)
at SMTPConnection._sendCommand (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1023:22)
at SMTPConnection._actionEHLO (/app/node_modules/nodemailer/lib/smtp-connection/index.js:1301:18)
at SMTPConnection._processResponse (/app/node_modules/nodemailer/lib/smtp-connection/index.js:991:20) {
errno: -32,
code: 'ESOCKET',
syscall: 'write',
command: 'CONN'
}
2025-12-12T13:17:46-08:00 [MONITOR] WARN: Monitor #99 '[redacted]': Failing: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call? | Interval: 120 seconds | Type: http | Down Count: 0 | Resend Interval: 0
Trace: KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
at Client_SQLite3.acquireConnection (/app/node_modules/knex/lib/client.js:332:26)
at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:305:28)
at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19)
at async RedBeanNode.storeCore (/app/node_modules/redbean-node/dist/redbean-node.js:150:26)
at async RedBeanNode.store (/app/node_modules/redbean-node/dist/redbean-node.js:110:20)
at async beat (/app/server/model/monitor.js:989:13)
at async Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1019:17) {
sql: undefined,
bindings: undefined
}
at Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1021:25)
2025-12-12T13:18:17-08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2025-12-12T13:18:17-08:00 [MONITOR] INFO: Try to restart the monitor