Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0 Beta - Receiving a trace error: insert into stat_hourly - Duplicate entry '43-1731949200' for key 'stat_hourly_monitor_id_timestamp_unique' #5357

Open
2 tasks done
undaunt opened this issue Nov 18, 2024 · 0 comments
Labels

Comments

@undaunt
Copy link

undaunt commented Nov 18, 2024

⚠️ Please verify that this question has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I'm seeing a trace error of duplicate entry for a given monitor stat. I'm not sure why, but I can provide the logs.

📝 Error Message(s) or Log


Trace: Error: insert into `stat_hourly` (`down`, `monitor_id`, `ping`, `ping_max`, `ping_min`, `timestamp`, `up`) values (0, 43, 94.4, 102, 87, 1731949200, 5) - Duplicate entry '43-1731949200' for key 'stat_hourly_monitor_id_timestamp_unique'
    at Packet.asError (/app/node_modules/mysql2/lib/packets/packet.js:738:17)
    at Query.execute (/app/node_modules/mysql2/lib/commands/command.js:29:26)
    at Connection.handlePacket (/app/node_modules/mysql2/lib/connection.js:481:34)
    at PacketParser.onPacket (/app/node_modules/mysql2/lib/connection.js:97:12)
    at PacketParser.executeStart (/app/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/app/node_modules/mysql2/lib/connection.js:104:25)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5) {
  code: 'ER_DUP_ENTRY',
  errno: 1062,
  sqlState: '23000',
  sqlMessage: "Duplicate entry '43-1731949200' for key 'stat_hourly_monitor_id_timestamp_unique'",
  sql: 'insert into `stat_hourly` (`down`, `monitor_id`, `ping`, `ping_max`, `ping_min`, `timestamp`, `up`) values (0, 43, 94.4, 102, 87, 1731949200, 5)'
}
    at Timeout.safeBeat [as _onTimeout] (/app/server/model/monitor.js:1012:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-11-18T09:59:16-08:00 [MONITOR] ERROR: Please report to https://github.com/louislam/uptime-kuma/issues
2024-11-18T09:59:16-08:00 [MONITOR] INFO: Try to restart the monitor

🐻 Uptime-Kuma Version

2.0.0-beta.0

💻 Operating System and Arch

TrueNAS Scale Electric Eel 24.10.0

🌐 Browser

N/A

🖥️ Deployment Environment

  • Runtime: Docker 27.1.1
  • Database: External MariaDB
  • Filesystem used to store the database on: ZFS on nvme
  • number of monitors: 16
@undaunt undaunt added the help label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant