Cannot update to 1.67.0 - migration issue

we’re trying to update to the latest prerelease 1.67.0 . We are using queue mode with 3 workers, they all crap out with the same error.

I’m guessing there’s a race condition happening and they are all trying to migrate the db

the process has these errors in the log

Permissions 0644 for n8n settings file /workspace/app/data/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.

2

Migrations in progress, please do NOT stop the process.

3

Starting migration AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644

4

Migration “AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644” failed, error: multiple primary keys for table “execution_annotation_tags” are not allowed

5

There was an error running database migrations

6

Error: There was an error running database migrations

7

at Worker.exitWithCrash (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:115:49)

8

at /usr/local/lib/node_modules/n8n/dist/commands/base-command.js:76:62

9

at processTicksAndRejections (node:internal/process/task_queues:95:5)

10

at Worker.init (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:76:9)

11

at Worker.init (/usr/local/lib/node_modules/n8n/dist/commands/worker.js:75:9)

12

at Worker._run (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@oclif/core/lib/command.js:301:13)

13

at Config.runCommand (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@oclif/core/lib/config/config.js:424:25)

14

at run (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]/node_modules/@oclif/core/lib/main.js:94:16)

15

at /usr/local/lib/node_modules/n8n/bin/n8n:71:2

16

17

multiple primary keys for table “execution_annotation_tags” are not allowed

18

QueryFailedError: multiple primary keys for table “execution_annotation_tags” are not allowed

19

at PostgresQueryRunner.query (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]_tutbbyeahxbi4lrlmyhbjxb2bi/node_modules/src/driver/postgres/PostgresQueryRunner.ts:331:19)

20

at processTicksAndRejections (node:internal/process/task_queues:95:5)

21

at PostgresQueryRunner.executeQueries (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]_tutbbyeahxbi4lrlmyhbjxb2bi/node_modules/src/query-runner/BaseQueryRunner.ts:660:13)

22

at PostgresQueryRunner.createPrimaryKey (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]_tutbbyeahxbi4lrlmyhbjxb2bi/node_modules/src/driver/postgres/PostgresQueryRunner.ts:2526:9)

23

at AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644.up (/usr/local/lib/node_modules/n8n/dist/databases/migrations/common/1728659839644-AddMissingPrimaryKeyOnAnnotationTagMapping.js:14:13)

24

at AddMissingPrimaryKeyOnAnnotationTagMapping1728659839644.up (/usr/local/lib/node_modules/n8n/dist/databases/utils/migration-helpers.js:162:21)

25

at MigrationExecutor.executePendingMigrations (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]_tutbbyeahxbi4lrlmyhbjxb2bi/node_modules/src/migration/MigrationExecutor.ts:336:17)

26

at DataSource.runMigrations (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]_tutbbyeahxbi4lrlmyhbjxb2bi/node_modules/src/data-source/DataSource.ts:404:13)

27

at Object.migrate (/usr/local/lib/node_modules/n8n/dist/db.js:67:5)

28

at Worker.init (/usr/local/lib/node_modules/n8n/dist/commands/base-command.js:76:9)

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

manually starting the workers now seems to work. I suspect because one of the workers or main process managed to perform the migration so the workers now don’t need to

2 Likes