Describe the problem/error/question
- N8N database was taking up about 70gb of space from execution data
- decided to update the docker compose file with added env variables to clear the execution after x days etc etc
- before launching I did a docker pull (whoops) and it updated to the very latest version of n8n, from what i read its requiring a database migration. and my 70gb of useless data is filling up my entire server drive trying to run the migration queries. (50gb free space)
What is the error message (if any)?
execution time: 1032
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 57550, 10
execution time: 1632
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 57580, 10
execution time: 1665
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 57590, 10
execution time: 1087
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 58270, 10
execution time: 1480
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 58790, 10
execution time: 1260
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 58800, 10
execution time: 1716
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 58810, 10
execution time: 1149
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 59610, 10
execution time: 2548
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 59720, 10
execution time: 2438
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 59730, 10
execution time: 2769
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 59740, 10
execution time: 1510
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 59790, 10
execution time: 1058
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 60210, 10
execution time: 1374
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 60220, 10
execution time: 2143
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 60300, 10
execution time: 1420
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 60510, 10
execution time: 1172
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 61410, 10
execution time: 1289
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 61420, 10
execution time: 1210
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 61560, 10
execution time: 2571
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 61570, 10
execution time: 2404
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 61580, 10
execution time: 1305
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 62300, 10
execution time: 2392
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 62410, 10
execution time: 2298
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 62420, 10
execution time: 2082
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 62430, 10
execution time: 1732
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 63320, 10
execution time: 1010
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 63330, 10
execution time: 1054
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 63350, 10
execution time: 1144
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 63410, 10
execution time: 1187
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64720, 10
execution time: 1731
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64730, 10
execution time: 1097
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64750, 10
execution time: 1991
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64760, 10
execution time: 2087
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64770, 10
execution time: 2023
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 64900, 10
execution time: 1408
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 65280, 10
execution time: 1581
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 66130, 10
execution time: 1886
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 66150, 10
execution time: 1004
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 66230, 10
execution time: 1200
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 66660, 10
execution time: 1365
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 67170, 10
execution time: 2356
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 67180, 10
execution time: 1520
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 67860, 10
execution time: 1295
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 68030, 10
execution time: 2060
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 68040, 10
execution time: 1817
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 68050, 10
execution time: 2339
Last session crashed
n8n ready on 0.0.0.0, port 5678
query is slow: SELECT * FROM "sqlite_master" WHERE "type" = 'table' AND "name" = 'migrations'
execution time: 1615
Migrations in progress, please do NOT stop the process.
query is slow: INSERT INTO "TMP_execution_entity" SELECT * FROM "execution_entity" LIMIT 12060, 10
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
So my question is How can i access the sql db file and drop the execution data table, without losing all my workflows/credentials/users etc??
I can access the container using sh terminal but not familiar about what to install into the container to run and open the database for sqlite?
Also i cant move the db file out and work with it because the VM just doesnt have that 70gb to play with.
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system: