© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
ImmichI
Immich•15mo ago•
7 replies
d-dragon297

microservices worker error: QueryFailedError: duplicate key value violates unique constraint

After updating to Version 1.122.1 (using docker-compose) and try to start the containers again the following errors occurs resulting in a failed start

Immich error:
immich_server            |   },
immich_server            |   length: 226,
immich_server            |   severity: 'ERROR',
immich_server            |   code: '23505',
immich_server            |   detail: 'Key (id)=(36) already exists.',
immich_server            |   hint: undefined,
immich_server            |   position: undefined,
immich_server            |   internalPosition: undefined,
immich_server            |   internalQuery: undefined,
immich_server            |   where: undefined,
immich_server            |   schema: 'public',
immich_server            |   table: 'migrations',
immich_server            |   column: undefined,
immich_server            |   dataType: undefined,
immich_server            |   constraint: 'PK_3a1b9f8427f50cd6123498b21df',
immich_server            |   file: 'nbtinsert.c',
immich_server            |   line: '663',
immich_server            |   routine: '_bt_check_unique'
immich_server            | }
immich_server            | microservices worker error: QueryFailedError: duplicate key value violates unique constraint "PK_3a1b9f8427f50cd6123498b21df"
immich_server            | microservices worker exited with code 1
immich_server            | Killing api process
immich_server exited with code 1
immich_server            |   },
immich_server            |   length: 226,
immich_server            |   severity: 'ERROR',
immich_server            |   code: '23505',
immich_server            |   detail: 'Key (id)=(36) already exists.',
immich_server            |   hint: undefined,
immich_server            |   position: undefined,
immich_server            |   internalPosition: undefined,
immich_server            |   internalQuery: undefined,
immich_server            |   where: undefined,
immich_server            |   schema: 'public',
immich_server            |   table: 'migrations',
immich_server            |   column: undefined,
immich_server            |   dataType: undefined,
immich_server            |   constraint: 'PK_3a1b9f8427f50cd6123498b21df',
immich_server            |   file: 'nbtinsert.c',
immich_server            |   line: '663',
immich_server            |   routine: '_bt_check_unique'
immich_server            | }
immich_server            | microservices worker error: QueryFailedError: duplicate key value violates unique constraint "PK_3a1b9f8427f50cd6123498b21df"
immich_server            | microservices worker exited with code 1
immich_server            | Killing api process
immich_server exited with code 1
ImmichJoin
A place to hang out, get support, discuss Immich, get announcements about releases and anything else going on.
36,590Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

duplicate key value violates unique constraint "UQ_assets_owner_checksum"
ImmichIImmich / help-desk-support
5mo ago
PostgresError: duplicate key value violates unique constraint "UQ_assets_owner_checksum"
ImmichIImmich / help-desk-support
10mo ago
Upload error: duplicate key value violates unique constraint "UQ_assets_own" on all uploads
ImmichIImmich / help-desk-support
6mo ago
uploading videos now throwing duplicate key value error
ImmichIImmich / help-desk-support
8mo ago