NVME drive for cache - am I doing it right:
please have a look on my two files:
docker compose: https://pastebin.com/RnBkGMcZ
env: https://pastebin.com/cpmSdf81
what I have done is I have added instructions from this topic :
https://github.com/immich-app/immich/discussions/2328
Am I correct assusming that following can/should be on NVME:
THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/
UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/
PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/
VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/
And this one one HDD:
LIBRARY_LOCATION=/mnt/user/Immich/
Can you please confirm, thanks!
47 Replies
:wave: Hey @Joloxx9,
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. :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.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:hi @Joloxx9 that seems to be good to go
One small adjustment though
You have
LIBRARY_LOCATION=/mnt/user/Immich/
and UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/
confused
Try this for clarity, docker compose:
Env file:
The names can get a bit confusing.
Alternatively you can also put UPLOAD_LOCATION in the HDD like so
docker compose:
Env file:
Because you really only want videos, thumbs and profile elsewhereYou know what I made it easier as I do not want to fight with it now, however got issue,I think something is not mounted etc right, so I am using two things in ENV FILE:
UPLOAD_LOCATION /qnap/data/foty
and
DB_DATA_LOCATION /data/immich
however I am having those issues now in log from immich server
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
[Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)...
Error: getaddrinfo EAI_AGAIN database
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
[Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)...
Error: getaddrinfo EAI_AGAIN database
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
[Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [ExceptionHandler] getaddrinfo EAI_AGAIN database
Error: getaddrinfo EAI_AGAIN database
at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26)
microservices worker exited with code 1
Killing api process
Initializing Immich v1.123.0
Detected CPU Cores: 12
Starting api worker
Starting microservices worker
(node:7) [DEP0060] DeprecationWarning: The
util._extend
API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ...
to show where the warning was created)
(node:7) [DEP0060] DeprecationWarning: The util._extend
API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ...
to show where the warning was created)
(node:17) [DEP0060] DeprecationWarning: The util._extend
API is deprecated. Please use Object.assign() instead.
(Use node --trace-deprecation ...
to show where the warning was created)
Which database is he talking about?The database,
immich_postgres
container
If it works after the errors then that means the container is just simply starting upno it is not working it is jsut restarting, I am using stock docker compose and ENV, immich is running on the server and data is mounted on this server from NAS I do not know if I mounted it correctly...
funny thing when I had everything on nas it was ok
DB_DATA is on the NAS?
yes

You shouldn't network mount the database, that'll work very poorly
as we can see here
hmm
I might move back, but firstly I just want this to work
I only do not understound why it got no access to it
If you want to move your immich install, best do a backup-restore
We aren’t going to help you use a network mount for the database
In your case, just run it on the NAS, do the backup, restore the DB on your new server and mount the NAS for the images
is database that slow ven when server - nas connection is 2.5Gb?
It doesn't matter
Network postgres WILL fail
hmm I can keep imich on the nas
and the database is only a couple of GB even with very large photo libraries
at least I have removed plex etc
so - can I keep database on server(NVME) and upload location on NAS(HDD), would that work?
Yes, that's how many people do it 🙂
okay that make sence, didn't know about it, let me modify it and we will see if I got an errors
bulk storage =
UPLOAD_LOCATION/library
and UPLOAD_LOCATION/upload
Fast storage = UPLOAD_LOCATION/encoded-videos
UPLOAD_LOCATION/thumbs
DB_DATA_LOCATION
profile is whatever, it's literally only your profile picturesAlso it’s better to not mount /library and /upload separately if you can help it, better to mount /usr/src/app/upload on the NAS and then do the thumbs etc as sub folders
This corresponds to https://discord.com/channels/979116623879368755/1320722118689689620/1320748675856728074 this setup approximately
(It's just missing DB_DATA_LOCATION)
I think I am stupid, please have a look at that:

first is on NAS(HDD), second on SSD(server)
both are mounted:

and still same error with no access, when I change access to 777 on /data/immich it changes it back to what you can see above
That’s fine, Postgres is setting the permissions
What’s the actual issue now then?
Also what’s the filesystem of that disk
ext4
issue is I constantly got this error:

Please post the DB logs
PostgreSQL Database directory appears to contain a database; Skipping initialization
2024-12-23 14:30:49.976 GMT [1] FATAL: 0 8kB is outside the valid range for parameter "shared_buffers" (16 .. 1073741823)
there is jsut that one line
ok
Why does your compose not have a command line for Postgres?
got error
I did not put my docker compose here, the one above is not what I used
I have finished with the one from github as I was setting up everything in portainer
You posted it here ?
it was my fault
Ok lol well post the new one
I changed this line
Sorry wrong

I deleted "M" by mistake lol....
Yep idk how you did that lol
I changed from 512 to 4096 and accidentally deleted M lol
anyway, working like a charm 😄
You probably shouldn’t change stuff like that
That’s a big shared buffer
you think?
I will revert them to previous values then 🙂
thanks for help
This thread has been closed. To re-open, use the button below.