Dashboard takes forever to load
See original GitHub issue⚠️ Please verify that this bug has NOT been raised before.
- I checked and didn’t find similar issue
🛡️ Security Policy
- I agree to have read this project Security Policy
Description
Loading the dashboard sometimes loads with no monitored entities. When this happens I see. Happens often. Average load on my system is
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:305:26) at runNextTicks (internal/process/task_queues.js:60:5) at listOnTimeout (internal/timers.js:526:9) at processTimers (internal/timers.js:500:7) at async Runner.ensureConnection (/app/node_modules/knex/lib/execution/runner.js:259:28) at async Runner.run (/app/node_modules/knex/lib/execution/runner.js:30:19) at async RedBeanNode.normalizeRaw (/app/node_modules/redbean-node/dist/redbean-node.js:570:22) at async RedBeanNode.getRow (/app/node_modules/redbean-node/dist/redbean-node.js:556:22) at async Function.calcUptime (/app/server/model/monitor.js:590:22) at async Function.sendUptime (/app/server/model/monitor.js:650:24) { sql: '\n' + ' SELECT\n' + ' -- SUM all duration, also trim off the beat out of time window\n' + ' SUM(\n' + ' CASE\n' + ' WHEN (JULIANDAY(time) - JULIANDAY(?)) * 86400 < duration\n' + ' THEN (JULIANDAY(time) - JULIANDAY(?)) * 86400\n' + ' ELSE duration\n' + ' END\n' + ' ) AS total_duration,\n' + '\n' + ' -- SUM all uptime duration, also trim off the beat out of time window\n' + ' SUM(\n' + ' CASE\n' + ' WHEN (status = 1)\n' + ' THEN\n' + ' CASE\n' + ' WHEN (JULIANDAY(time) - JULIANDAY(?)) * 86400 < duration\n' + ' THEN (JULIANDAY(time) - JULIANDAY(?)) * 86400\n' + ' ELSE duration\n' + ' END\n' + ' END\n' + ' ) AS uptime_duration\n' + ' FROM heartbeat\n' + ' WHERE time > ?\n' + ' AND monitor_id = ?\n' + ' ', bindings: [ '2022-02-15 19:32:42', '2022-02-15 19:32:42', '2022-02-15 19:32:42', '2022-02-15 19:32:42', '2022-02-15 19:32:42', 20 ] } at process.<anonymous> (/app/server/server.js:1553:13) at process.emit (events.js:400:28) at processPromiseRejections (internal/process/promises.js:245:33) at processTicksAndRejections (internal/process/task_queues.js:96:32) at runNextTicks (internal/process/task_queues.js:64:3) at listOnTimeout (internal/timers.js:526:9) at processTimers (internal/timers.js:500:7) If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
👟 Reproduction steps
I do not know what triggers this
👀 Expected behavior
I see my monitored services
😓 Actual Behavior
Dashboard loads w/ no monitored services
🐻 Uptime-Kuma Version
1.12.1
💻 Operating System and Arch
Raspbian / Raspberry pi 3
🌐 Browser
MS Edge
🐋 Docker Version
20.10.12, build e91ed57
🟩 NodeJS Version
No response
📝 Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (2 by maintainers)

Top Related StackOverflow Question
I’m seeing the same issue and error in my own installations and some PikaPods.com users have reported them.
Workaround is to limit history days (to 14 or 30 days) and clear the history. As others have noticed the issue starts at around 1 GB DB size.
It’s not a network drive, but by default we only assign 0.25 CPU cores. That gives about 3 MB/s read/write speed from what I see. That may be too slow and maybe we need more cores for more history.
personally, i would lean on postgresql support. but i think the most ideal and beneficial support is support for different database systems like postgresql, mysql, sqlite, etc.