#Help with error "[Microservices:DatabaseService] Could not run vector reindexing checks."

1 messages Β· Page 1 of 1 (latest)

waxen vortex
slow quartzBOT
#

:wave: Hey @waxen vortex,

Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich immich.

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: uploaded the relevant information (see below).
  7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

GitHub

Explore the GitHub Discussions forum for immich-app immich. Discuss code, ask questions & collaborate with the developer community.

GitHub

High performance self-hosted photo and video management solution. - Issues Β· immich-app/immich

slow quartzBOT
whole coral
#

Hmm, it seems something wrong happened with the index. You can try running these SQL commands:

DROP INDEX IF EXISTS clip_index;

SET vectors.pgvector_compatibility=on;

CREATE INDEX clip_index ON smart_search
USING hnsw (embedding vector_cosine_ops)
WITH (ef_construction = 300, m = 16);
waxen vortex
# whole coral Hmm, it seems something wrong happened with the index. You can try running these...

It looks like it throws a similar error, I don't think it ran the first command successfully

root@81cfb0b1ad1b:/# psql -U postgres -d immich
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.

immich=# DROP INDEX IF EXISTS clip_index;

SET vectors.pgvector_compatibility=on;

CREATE INDEX clip_index ON smart_search
USING hnsw (embedding vector_cosine_ops)
WITH (ef_construction = 300, m = 16);
ERROR:  pgvecto.rs: IPC connection is closed unexpected.
ADVICE: The error is raisen by background worker errors. Please check the full PostgreSQL log to get more information. Please read `https://docs.pgvecto.rs/admin/configuration.html`.
SET
ERROR:  relation "clip_index" already exists
karmic pawn
#

Did you paste it all in one go? If yes, run the commands one at a time

waxen vortex
# karmic pawn Did you paste it all in one go? If yes, run the commands one at a time

The same error occured after the first command. Do i continue with the rest?


root@81cfb0b1ad1b:/# psql -U postgres -d immich
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.

immich=# DROP INDEX IF EXISTS clip_index;
ERROR:  pgvecto.rs: IPC connection is closed unexpected.
ADVICE: The error is raisen by background worker errors. Please check the full PostgreSQL log to get more information. Please read `https://docs.pgvecto.rs/admin/configuration.html`.
immich=# 

crude hinge
karmic pawn
waxen vortex
waxen vortex
karmic pawn
#

No no

#

the indices are stored in a specific folder and deleting the content of the folder is the same as dropping the index

waxen vortex
#

Oh okay, i see. Just checked the link. I'll back mv the folder and restart and see where that goes

crude hinge
#

I think it might be worth to try updating that to 0.3.0

#

tbc, you do have backups right?

#

Before we end up destroying something πŸ˜…

waxen vortex
# crude hinge tbc, you do have backups right?

I have a backup but it's a couple months outdated + I have not validated it yet since it was only an rsync to an external drive that I currently have unplugged. Let me double check the data is there and looks correct and get back to you

crude hinge
#

Yeah definitely make a backup before continuing

#

(and you should really have a regular automated backup in place tbh)

waxen vortex
# crude hinge (and you should really have a regular automated backup in place tbh)

I've been in the process of converting my stack to replicatable VMs so I can have a better backup solution than my previous which was a weekly systemd timer that ran an rsync to a drive plugged into the computer. My current plan is to have a 2nd PC at a friends house that it backs up to now. Waiting on my new drive to come in for that and then that problem will be solved. πŸ˜›

karmic pawn
#

nice πŸ™‚

#

for this effort, a database dump should suffice

waxen vortex
#

Just did the database dump, should I try updating to 0.3.0 first or moving pgdata/pg_vectors to a temp directory and restarting?

crude hinge
#

I think there's a good chance you may end up needing both together

#

So up to you :P

waxen vortex
#

Got it, lol

#

I tried moving the pg_vectors and starting it up and so far it looks to be working fine? What would the impact of upgrading to 0.3.0 be, and should I still try it?

crude hinge
#

If it ain't broken don't fix it ;)

karmic pawn
#

Be sure to still:

SET vectors.pgvector_compatibility=on;

CREATE INDEX clip_index ON smart_search
USING hnsw (embedding vector_cosine_ops)
WITH (ef_construction = 300, m = 16);
waxen vortex
karmic pawn
#

Does DROP INDEX IF EXISTS clip_index; work now?

#

CLIP is for the smart search, so it shouldn't hinder everything else

waxen vortex
#

Yes it did

immich=# DROP INDEX IF EXISTS clip_index;
DROP INDEX
karmic pawn
#

and can you now create it again? πŸ˜›

waxen vortex
#

Looks like it!

immich-# WITH (ef_construction = 300, m = 16);
CREATE INDEX
karmic pawn
#

After that is done I'm not sure smart search will work yet, feel free to try first

waxen vortex
#

I mean, it looks like it is

karmic pawn
#

Excellent πŸ™‚

waxen vortex
#

Thank you, mertalev and bo0tzz so much for your help, I thought my immich was going to be dead for a little there lol

karmic pawn
#

You should have the automated backups, unless you disabled it