[BUG] microservices ERROR duplicate key #272

Closed
opened 2026-02-04 19:14:54 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @tom1234559 on GitHub (Sep 8, 2022).

Describe the bug
microservices error: ERROR Error generate checksum QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum"
this error occurs every second and no other tasks like mapbox a executed

Task List

Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.

  • I have read thoroughly the README setup and installation instructions.
  • I have included my docker-compose file.
  • I have included my redacted .env file.
  • I have included information on my machine, and environment.

Expected behavior
no errors and other tasks should run

System

  • Server Version: v1.28.0
  • cpu: x86_64

Additional context
Add any other context about the problem here.

Originally created by @tom1234559 on GitHub (Sep 8, 2022). <!-- Note: Please search to see if an issue already exists for the bug you encountered. --> **Describe the bug** microservices error: ERROR Error generate checksum QueryFailedError: duplicate key value violates unique constraint "UQ_userid_checksum" this error occurs every second and no other tasks like mapbox a executed **Task List** *Please complete the task list below. We need this information to help us reproduce the bug or point out problems in your setup. You are not providing enough info may delay our effort to help you.* - [x] I have read thoroughly the README setup and installation instructions. - [ ] I have included my `docker-compose` file. - [ ] I have included my redacted `.env` file. - [x] I have included information on my machine, and environment. **Expected behavior** no errors and other tasks should run **System** - Server Version: `v1.28.0` - cpu: x86_64 **Additional context** Add any other context about the problem here.
Author
Owner

@alextran1502 commented on GitHub (Sep 8, 2022):

This is expected behavior if you upload a duplicated file.

Is this a clean installation?

@alextran1502 commented on GitHub (Sep 8, 2022): This is expected behavior if you upload a duplicated file. Is this a clean installation?
Author
Owner

@tom1234559 commented on GitHub (Sep 8, 2022):

no it isn't - i have around 20.000 images from 3 devices (2 mobil phones and web).
Because of web uploads there could have been duplicated files uploaded, but this was bout a month ago. It works until one of the last updates.
All other function are working fine like uploading, adding pictures to albums etc.
Uploading is also working (mobil app and web) and i don't upload anything at the moment.

So the only solution would be a reinstall and reuploading all pictures? So that microserivces will work again.

@tom1234559 commented on GitHub (Sep 8, 2022): no it isn't - i have around 20.000 images from 3 devices (2 mobil phones and web). Because of web uploads there could have been duplicated files uploaded, but this was bout a month ago. It works until one of the last updates. All other function are working fine like uploading, adding pictures to albums etc. Uploading is also working (mobil app and web) and i don't upload anything at the moment. So the only solution would be a reinstall and reuploading all pictures? So that microserivces will work again.
Author
Owner

@alextran1502 commented on GitHub (Sep 8, 2022):

I assume you just performed the update? With the latest release, it would perform the hash calculation of each file, therefor the CPU will be choked for a little while. Once it is done, you can use the server just fine without re-uploading the assets. The message you see is expected when it is performing the checksum calculation and inserting the value into the database.

The duplicated asset will have the checksum value as null.

@alextran1502 commented on GitHub (Sep 8, 2022): I assume you just performed the update? With the latest release, it would perform the hash calculation of each file, therefor the CPU will be choked for a little while. Once it is done, you can use the server just fine without re-uploading the assets. The message you see is expected when it is performing the checksum calculation and inserting the value into the database. The duplicated asset will have the checksum value as `null`.
Author
Owner

@tom1234559 commented on GitHub (Sep 8, 2022):

Ok thanks,
then i will wait - i already saw that the container has a very high workload. But i wasn't completely sure how the has calculation would deal with old files or how duplictaed files are shown in the logs.

@tom1234559 commented on GitHub (Sep 8, 2022): Ok thanks, then i will wait - i already saw that the container has a very high workload. But i wasn't completely sure how the has calculation would deal with old files or how duplictaed files are shown in the logs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#272