Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Uptime Kuma
  3. Kuma Uptime - ERROR: Database migration failed

Kuma Uptime - ERROR: Database migration failed

Scheduled Pinned Locked Moved Unsolved Uptime Kuma
14 Posts 7 Posters 271 Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A arta

    Whatever this is, it happened after the recent update. When I restore to a working backup before the update, the app comes back online but my entries dont work.

    jamesJ Offline
    jamesJ Offline
    james
    Staff
    wrote last edited by
    #4

    Hello @arta
    Can you please try to give the app more memory before doing the update?

    1 Reply Last reply
    1
    • A Offline
      A Offline
      arta
      wrote last edited by
      #5

      I gave it 8GB of RAM and then updated it. At some point it forwarded the domain domain to /migrate-status and then in the log I am getting this:

      Oct 28 17:53:59 2025-10-28T14:23:59Z [SERVER] ERROR: Failed to prepare your database: Aggregate table migration is already in progress
      Oct 28 17:53:59 2025-10-28T14:23:59Z [SERVER] INFO: Connected to the database
      Oct 28 17:53:59 2025-10-28T14:23:59Z [SERVER] INFO: Creating express and socket.io instance
      Oct 28 17:53:59 2025-10-28T14:23:59Z [SERVER] INFO: Data Dir: ./data/
      Oct 28 17:53:59 2025-10-28T14:23:59Z [SERVER] INFO: Server Type: HTTP
      Oct 28 17:53:59 2025-10-28T14:23:59Z [DB] ERROR: Database migration failed
      Oct 28 17:53:59 2025-10-28T14:23:59Z [DB] WARN: Aggregate table migration is already in progress, or it was interrupted
      Oct 28 17:53:59 2025-10-28T14:23:59Z [DB] INFO: Database Type: sqlite
      Oct 28 17:54:03 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:13 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:23 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:33 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:43 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:53 => Healtheck error: Error: connect EHOSTUNREACH 172.18.16.87:3001
      Oct 28 17:54:59 2025-10-28T14:24:59Z
      Oct 28 17:54:59 2025-10-28T14:24:59Z
      Oct 28 17:54:59 ==> Overriding settings
      Oct 28 17:54:59 ==> Removing sqlite backup files
      Oct 28 17:54:59 ==> Starting Uptime Kuma
      Oct 28 17:54:59 > node server/server.js
      Oct 28 17:54:59 > uptime-kuma@2.0.1 start-server
      Oct 28 17:55:00 => Healtheck error: Error: connect ECONNREFUSED 172.18.16.87:3001
      Oct 28 17:55:00 Welcome to Uptime Kuma
      Oct 28 17:55:00 2025-10-28T14:25:00Z [SERVER] INFO: Env: production
      Oct 28 17:55:00 2025-10-28T14:25:00Z [SERVER] INFO: Loading modules
      Oct 28 17:55:00 2025-10-28T14:25:00Z [SERVER] INFO: Uptime Kuma Version: 2.0.1
      Oct 28 17:55:00 Your Node.js version: 18.20.8
      

      and its getting repeated. Does it mean its migrating?

      1 Reply Last reply
      1
      • nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote last edited by
        #6

        From the error it looks like a previous migration failed mid-way and now the app can't continue. You have to restore it and retry the update I guess

        1 Reply Last reply
        0
        • robiR Offline
          robiR Offline
          robi
          wrote last edited by
          #7

          It might need more memory for this

          Conscious tech

          1 Reply Last reply
          0
          • A Offline
            A Offline
            arta
            wrote last edited by
            #8

            I am sort of stuck here.

            I gave it 16 GB of RAM and still at some point same scenario happened.
            My monitor history is too large, so what I tried was to purge all data so it will be light weight for the upgrade. The history data is not important, I used the tool under setting> Monitor history> Clear Statistics

            However I get this error:
            Screenshot at Oct 29 16-06-35.png

            I dont have any other older working backups.

            nebulonN 1 Reply Last reply
            0
            • luckowL Offline
              luckowL Offline
              luckow
              translator
              wrote last edited by
              #9

              You can try this: https://github.com/louislam/uptime-kuma/issues/5281#issuecomment-2452376039
              That didn't work for me.

              Pronouns: he/him | Primary language: German

              A 1 Reply Last reply
              0
              • A arta

                I am sort of stuck here.

                I gave it 16 GB of RAM and still at some point same scenario happened.
                My monitor history is too large, so what I tried was to purge all data so it will be light weight for the upgrade. The history data is not important, I used the tool under setting> Monitor history> Clear Statistics

                However I get this error:
                Screenshot at Oct 29 16-06-35.png

                I dont have any other older working backups.

                nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote last edited by
                #10

                @arta since the database is corrupt already in your instance, you probably first have to restore the app. Then cleart some historical data and then perform the update.

                Also just to keep in mind, increasing the memory limit of an app does not mean it will get all that memory allocated, but that is only the upper limit it may use if the system even has that amount of memory available.

                1 Reply Last reply
                0
                • luckowL luckow

                  You can try this: https://github.com/louislam/uptime-kuma/issues/5281#issuecomment-2452376039
                  That didn't work for me.

                  A Offline
                  A Offline
                  arta
                  wrote last edited by
                  #11

                  @luckow said in Kuma Uptime - ERROR: Database migration failed:

                  You can try this: https://github.com/louislam/uptime-kuma/issues/5281#issuecomment-2452376039
                  That didn't work for me.

                  That didn't work for me either!

                  Funny thing is, since the monitoring data is not important, I took a backup of all my hosts, uninstalled the app, when I want to import it, the backup/restore function is completely removed from Kuma in the new version 😆

                  /settings/backup does not exit in new update

                  1 Reply Last reply
                  1
                  • jamesJ james moved this topic from Support
                  • S Offline
                    S Offline
                    sparkwise
                    wrote last edited by sparkwise
                    #12

                    Wanted to share a working solution, lightly adapted for Cloudron from Github issue comment referenced above:

                    1. Enter Recovery Mode
                    2. On the app's terminal: sqlite3 /app/code/data/kuma.db "DELETE FROM setting WHERE key = 'migrateAggregateTableState';"
                    3. Exit Recovery Mode
                    SansGuidonS 1 Reply Last reply
                    5
                    • S sparkwise

                      Wanted to share a working solution, lightly adapted for Cloudron from Github issue comment referenced above:

                      1. Enter Recovery Mode
                      2. On the app's terminal: sqlite3 /app/code/data/kuma.db "DELETE FROM setting WHERE key = 'migrateAggregateTableState';"
                      3. Exit Recovery Mode
                      SansGuidonS Offline
                      SansGuidonS Offline
                      SansGuidon
                      wrote last edited by SansGuidon
                      #13

                      @sparkwise said in Kuma Uptime - ERROR: Database migration failed:

                      Wanted to share a working solution, lightly adapted for Cloudron from Github issue comment referenced above:

                      1. Enter Recovery Mode
                      2. On the app's terminal: bash sqlite3 /app/code/data/kuma.db "DELETE FROM setting WHERE key = 'migrateAggregateTableState';"
                      3. Exit Recovery Mode

                      I've just tried this, without the initial bash and it seems to have worked. And now I'm starting the major Cloudron upgrade 🙂 ...

                      About me / Now

                      1 Reply Last reply
                      1
                      • S Offline
                        S Offline
                        sparkwise
                        wrote last edited by sparkwise
                        #14

                        Sorry. bash wasn't supposed to be there. Failed attempt to format the markdown code block.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Bookmarks
                        • Search