Closed travelr closed 1 year ago
There is a current limitation where the same person cannot appear in the same photo not than once, otherwise it throws this error. This is a limitation we're looking to remove soon.
This actually should be fixed once #4474 is released.
This issue still occurs with some photos using version 1.8.4. But the errors are now occurring less compared to 1.8.2
[Nest] 7 - 11/05/2023, 10:00:47 AM ERROR [JobService] Unable to run job handler (recognizeFaces/recognize-faces): QueryFailedError: insert or update on table "asset_faces" violates foreign key constraint "FK_95ad7106dd7b484275443f580f9"
[Nest] 7 - 11/05/2023, 10:00:47 AM ERROR [JobService] QueryFailedError: insert or update on table "asset_faces" violates foreign key constraint "FK_95ad7106dd7b484275443f580f9"
at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async InsertQueryBuilder.execute (/usr/src/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)
at async SubjectExecutor.executeInsertOperations (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:260:42)
at async SubjectExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/SubjectExecutor.js:92:9)
at async EntityPersistExecutor.execute (/usr/src/app/node_modules/typeorm/persistence/EntityPersistExecutor.js:140:21)
at async PersonService.handleRecognizeFaces (/usr/src/app/dist/domain/person/person.service.js:194:13)
at async /usr/src/app/dist/domain/job/job.service.js:108:37
at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:350:28)
at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:535:24)
[Nest] 7 - 11/05/2023, 10:00:47 AM ERROR [JobService] Object:
{
"id": "02144ef9-fc32-4ebd-b78a-8fd1a5701db4"
}
}
The bug
Hi,
the face recognition job is causing foreign key constraint violations with the table persons
The OS that Immich Server is running on
Ubuntu 22
Version of Immich Server
v1.8.2.1
Version of Immich Mobile App
latest
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Reproduction is unclear, in previous runs facial recognition worked. Various faces are already identified in the database.
Now after adding a bunch of photos to the external library, facial recognition always fails with the constraint violation.
Additional information
Please advise what further information is required.