#Help with error "[Microservices:DatabaseService] Could not run vector reindexing checks."
1 messages Β· Page 1 of 1 (latest)
: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
.
References
- Container Logs:
docker compose logsdocs - Container Status:
docker ps -adocs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
- :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
- :ballot_box_with_check: read applicable release notes.
- :ballot_box_with_check: reviewed the FAQs for known issues.
- :ballot_box_with_check: reviewed Github for known issues.
- :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
- :ballot_box_with_check: uploaded the relevant information (see below).
- :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 -landdf -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.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
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);
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
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=#
Which pgvecto.rs version are you running?
https://github.com/tensorchord/pgvecto.rs/issues/409#issuecomment-1978161420 this dev suggests dropping the index by deleting the files on disk π
This is from my docker compose yaml. I am assuming this is the correct information?
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
Like, getting rid of all my photos ?
No no
the indices are stored in a specific folder and deleting the content of the folder is the same as dropping the index
Oh okay, i see. Just checked the link. I'll back mv the folder and restart and see where that goes
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 π
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
Yeah definitely make a backup before continuing
(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. π
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?
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?
If it ain't broken don't fix it ;)
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);
Is this a problem at all? It still seems to be properly loading images on the webpage
immich-# WITH (ef_construction = 300, m = 16);
ERROR: relation "clip_index" already exists
Does DROP INDEX IF EXISTS clip_index; work now?
CLIP is for the smart search, so it shouldn't hinder everything else
Yes it did
immich=# DROP INDEX IF EXISTS clip_index;
DROP INDEX
and can you now create it again? π
Looks like it!
immich-# WITH (ef_construction = 300, m = 16);
CREATE INDEX
After that is done I'm not sure smart search will work yet, feel free to try first
I mean, it looks like it is
Excellent π
Thank you, mertalev and bo0tzz so much for your help, I thought my immich was going to be dead for a little there lol
You should have the automated backups, unless you disabled it