I
Immich2mo ago
andrew

Immich fails to connect to db

Running Immich on unraid using the Immich and PostgreSQL_Immich apps. The other day after upgrading to 7.0.1 and rebooting, one of my cache nvme's (in a pool) was not detected. I shut down and reseated the drive for it to be detected. After booting again and starting array etc, my docker service wouldnt start. I reinstalled all of the apps but now immich fails daily. A restart of the Postgres container fixes it.
From the Immich log. [Nest] 128334 - 03/12/2025, 10:27:52 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)... error: could not open file "global/pg_filenode.map": Permission denied at Parser.parseErrorMessage (/app/immich/server/node_modules/pg-protocol/dist/parser.js:283:98) at Parser.handlePacket (/app/immich/server/node_modules/pg-protocol/dist/parser.js:122:29) at Parser.parse (/app/immich/server/node_modules/pg-protocol/dist/parser.js:35:38) at Socket.<anonymous> (/app/immich/server/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:191:23)
9 Replies
Immich
Immich2mo ago
:wave: Hey @andrew, 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 - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - 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... 1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: 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.
andrew
andrewOP2mo ago
No description
Mraedis
Mraedis2mo ago
Your permissions are broken after the upgrade specifically on the postgres folders
Zeus
Zeus2mo ago
Also your disk might be full
andrew
andrewOP2mo ago
I checked the permissions of the files that it says its can't access and they seem correct. I can restart the db container and it works fine. I did check my docker volume and there is free space
Zeus
Zeus2mo ago
Most likely your nas is running a nightly job thats causing permissions to change This isnt something immich would have any control over Or perhaps its moving files off the cache to another storage Theres also a good chance your drive is just broken It could be going read only. Requiring a re seat makes no sense
andrew
andrewOP2mo ago
Yeah I suspected a nightly process which I did have the appdata backup running nightly. I excluded immich from it but its still happening. I do not think its the drive, its also in a cache pool with another drive.
Zeus
Zeus2mo ago
Must be the OS then, I would start researching that
Immich
Immich2mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?