#Immich not starting after upgrading to v1.109.2 with cache lookup failed for index 65124

1 messages · Page 1 of 1 (latest)

shy copper
#

I upgraded to version v1.109.2 (latest version available on TrueNAS) from v1.106.x and now Immich isn't starting (was working just fine before). It's running on TrueNAS Scale. I've attached the logs from the main container when it starts up, the microservices fail to start with a driverError: error: cache lookup failed for index 65124 message. Do you all have any suggestions on what database commands to run to fix this?

I searched on Github and the solutions posted in https://github.com/immich-app/immich/issues/11202 and https://github.com/immich-app/immich/issues/10767#issuecomment-2206506347 did not solve my problems.

Any help would be greatly appreciated!

dusty saddleBOT
#

:wave: Hey @shy copper,

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

References

Checklist

  1. :ballot_box_with_check: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: I have read applicable release notes.
  3. :ballot_box_with_check: I have reviewed the FAQs for known issues.
  4. :ballot_box_with_check: I have reviewed Github for known issues.
  5. :ballot_box_with_check: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :ballot_box_with_check: I have uploaded the relevant logs, docker compose, and .env files, making sure to use code formatting.
  7. :ballot_box_with_check: I have 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)

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

dusty saddleBOT
hushed oxide
#

It looks like DB corruption. Bring down everything, add -P to the database service's command section, bring up only the database, connect to it and run REINDEX INDEX pg_class; followed by REINDEX system, then make a backup.

#

Oh, since this is TrueNAS you probably can't add -P or bring up only the database. The two commands and backup are the most important, so it's okay to just do those

shy copper
#

Hey @hushed oxide! Thanks for the suggestion. I tried the first command but got an error:

ERROR:  "pg_class" is not an index```
hushed oxide
shy copper
#

That's giving me a syntax error?

ERROR:  syntax error at or near "pg_class"
LINE 1: REINDEX pg_class;
                ^
hushed oxide
#

lol I swear I know sql REINDEX TABLE pg_class;

shy copper
#

That worked! The other command is also giving an error:

immich=# REINDEX system;
ERROR:  syntax error at or near ";"
LINE 1: REINDEX system;
hushed oxide
#

REINDEX SYSTEM immich;

shy copper
#

Unfortunately that didn't seem to fix the issue. Stopping and restarting the container gives the same errors

hushed oxide
#

Can you try VACUUM FULL;?

shy copper
#

No difference unfortunately. Same error.

#

I just ran your commands via psql and then stopped and started the app via the TrueNAS GUI. That should be sufficient, right?

hushed oxide
#

Yup. Not sure what's going on with this, but it's clearly not an index corruption issue anymore. If the data itself is corrupt, then the DB is in a kinda rough spot

#

Can you run DROP INDEX face_index;?

shy copper
#

That gives the same error as above:

immich=# DROP INDEX face_index;
ERROR:  cache lookup failed for index 65124
#

I backupped the database before doing the Immich upgrade and everything was working before I upgraded