Skip to content

SQLITE_CORRUPT: database disk image is malformed Migration Error from 1.23.15 to 2.0.0-beta #5281

Description

@corasaniti

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

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

Migration Error

📝 Error Message(s) or Log

2024-10-29T22:13:44Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-08 [81.83%][45/45]
2024-10-29T22:13:44Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-09 [81.85%][45/45]
2024-10-29T22:13:44Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-10 [81.87%][45/45]
2024-10-29T22:13:44Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-11 [81.89%][45/45]
2024-10-29T22:13:45Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-12 [81.91%][45/45]
2024-10-29T22:13:45Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-13 [81.93%][45/45]
2024-10-29T22:13:45Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-14 [81.95%][45/45]
2024-10-29T22:13:46Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-15 [81.97%][45/45]
2024-10-29T22:13:46Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-16 [81.99%][45/45]
2024-10-29T22:13:46Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-17 [82.01%][45/45]
2024-10-29T22:13:46Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-18 [82.03%][45/45]
2024-10-29T22:13:47Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-19 [82.05%][45/45]
2024-10-29T22:13:47Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-20 [82.07%][45/45]
2024-10-29T22:13:47Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-21 [82.09%][45/45]
2024-10-29T22:13:47Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-22 [82.11%][45/45]
2024-10-29T22:13:48Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-23 [82.13%][45/45]
2024-10-29T22:13:48Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-24 [82.15%][45/45]
2024-10-29T22:13:48Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-25 [82.17%][45/45]
2024-10-29T22:13:48Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-26 [82.19%][45/45]
2024-10-29T22:13:49Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-27 [82.21%][45/45]
2024-10-29T22:13:49Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-28 [82.23%][45/45]
2024-10-29T22:13:49Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-29 [82.25%][45/45]
2024-10-29T22:13:49Z [DB] INFO: [DON'T STOP] Migrating monitor data 67 - 2024-09-30 [82.27%][45/45]
2024-10-29T22:13:49Z [DB] INFO: Clearing non-important heartbeats
2024-10-29T22:13:49Z [DB] INFO: Deleting non-important heartbeats for monitor 18
2024-10-29T22:17:53Z [DB] INFO: Deleting non-important heartbeats for monitor 19
2024-10-29T22:21:38Z [DB] INFO: Deleting non-important heartbeats for monitor 20
2024-10-29T22:25:28Z [DB] INFO: Deleting non-important heartbeats for monitor 21
2024-10-29T22:29:14Z [DB] INFO: Deleting non-important heartbeats for monitor 22
2024-10-29T22:33:05Z [DB] INFO: Deleting non-important heartbeats for monitor 23
2024-10-29T22:33:12Z [DB] ERROR: Database migration failed
2024-10-29T22:33:12Z [SERVER] ERROR: Failed to prepare your database:
                DELETE FROM heartbeat
                WHERE monitor_id = 23
                AND important = 0
                AND time < DATETIME('now', -24 || ' hours')
                AND id NOT IN (
                    SELECT id
                    FROM heartbeat
                    WHERE monitor_id = 23
                    ORDER BY time DESC
                    LIMIT 100
                )
             - SQLITE_CORRUPT: database disk image is malformed
pi@raspi5-work:~/docker/uptime-kuma $
Welcome to Uptime Kuma
Your Node.js version: 20.18.0
2024-10-29T22:36:31Z [SERVER] INFO: Env: production
2024-10-29T22:36:32Z [SERVER] INFO: Uptime Kuma Version: 2.0.0-beta.0
2024-10-29T22:36:32Z [SERVER] INFO: Loading modules
2024-10-29T22:36:33Z [SERVER] INFO: Creating express and socket.io instance
2024-10-29T22:36:33Z [SERVER] INFO: Server Type: HTTP
2024-10-29T22:36:33Z [SERVER] INFO: Data Dir: ./data/
2024-10-29T22:36:33Z [DB] INFO: Database Type: sqlite
2024-10-29T22:36:33Z [SERVER] INFO: Connected to the database
2024-10-29T22:36:33Z [DB] WARN: Aggregate table migration is already in progress, or it was interrupted
2024-10-29T22:36:33Z [DB] ERROR: Database migration failed
2024-10-29T22:36:33Z [SERVER] ERROR: Failed to prepare your database: Aggregate table migration is already in progress

🐻 Uptime-Kuma Version

1.23.15 to 2 beta

💻 Operating System and Arch

RaspianOS Bookworm based

🌐 Browser

Chrome and Opera

🖥️ Deployment Environment

  • Runtime: Docker version 27.3.1
  • Database: sqllite
  • Filesystem used to store the database on:
  • number of monitors: 44

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions