I
Immich•4mo ago
ogokcocoball

External Library Watching Condition Questions

I know that external library watching works if I configure docker on the same machine. Please let me know how to use External Library watching in the following configuration. server (proxmox, native machine) - File Server (vm, NFS v4.1, Pass-through SATA controller) - immich (lxc, docker on lxc) Configuration to mount a network drive using NFS in immich lxc and then map the volume to docker. Is there a way to use external library watching if the file server is isolated like this? If necessary, I can change the entire configuration, but I don't want to run docker within the File Server.
25 Replies
Immich
Immich•4mo ago
:wave: Hey @ogokcocoball, 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. :blue_square: 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:
Mraedis
Mraedis•4mo ago
Why would it be any different? Whether it works well is yet to be seen
ogokcocoball
ogokcocoballOP•4mo ago
Do you mean that external library watching should work with the current configuration as well? Currently, my server is not working properly.
Mraedis
Mraedis•4mo ago
You didn't share that or any details on it so it's hard to give proper advice
ogokcocoball
ogokcocoballOP•4mo ago
I thought it was normal not to work in this configuration. I'll post more details.
docker-compose.sh
name: immich

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
devices:
- /dev/dri:/dev/dri
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- /data/photo:/data/photo
env_file:
- .env
ports:
- 2283:2283
depends_on:
- redis
- database
restart: always

immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env
restart: always

redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b
healthcheck:
test: redis-cli ping || exit 1
restart: always

database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always

volumes:
model-cache:
docker-compose.sh
name: immich

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
devices:
- /dev/dri:/dev/dri
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- /data/photo:/data/photo
env_file:
- .env
ports:
- 2283:2283
depends_on:
- redis
- database
restart: always

immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env
restart: always

redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b
healthcheck:
test: redis-cli ping || exit 1
restart: always

database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always

volumes:
model-cache:
.env
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
.env
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
- current immich version : v 1.134.0 - Currently, manual scanning and periodic scanning work perfectly. Is there any other information you need?
Mraedis
Mraedis•4mo ago
Yes you said it wasn't working properly, what are your observations there
ogokcocoball
ogokcocoballOP•4mo ago
Simply, after turning on the Library watching (EXPERIMENTAL) flag, I uploaded the photo to the file server and waited. There was no response over time, and when I scanned it manually, the picture was added to immich.
Mraedis
Mraedis•4mo ago
You could try adding actimeo=1 as an option to your NFS mount
ogokcocoball
ogokcocoballOP•4mo ago
cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
111.222.0.101:/volume1/homes /data/photo nfs4 defaults,_netdev,hard,retry=30,retrans=5,timeo=600,actimeo=1 0 0
111.222.0.101:/volume1/media /data/media nfs4 defaults,_netdev,hard,retry=30,retrans=5,timeo=600,actimeo=1 0 0
cat /etc/fstab
# UNCONFIGURED FSTAB FOR BASE SYSTEM
111.222.0.101:/volume1/homes /data/photo nfs4 defaults,_netdev,hard,retry=30,retrans=5,timeo=600,actimeo=1 0 0
111.222.0.101:/volume1/media /data/media nfs4 defaults,_netdev,hard,retry=30,retrans=5,timeo=600,actimeo=1 0 0
I rebooted lxc after setting actimeo=1. It's been 5 minutes since I added the photo, but there's no response.
Mraedis
Mraedis•4mo ago
Welp, I'm out of ideas here 👀
ogokcocoball
ogokcocoballOP•4mo ago
Thank you for your help. Does external library watching work even in NFS mounted environments? I'd like to know if it's a problem that only happens in my environment.
Mraedis
Mraedis•4mo ago
Not too sure, it's experimental for a reason @etnoy might know
etnoy
etnoy•4mo ago
No, I'm pretty sure inotify does not propagate over nfs
Mraedis
Mraedis•4mo ago
A definitive answer if ever there was one
ogokcocoball
ogokcocoballOP•4mo ago
If so, it won't work with this configuration. Can you recommend another alternative?
Mraedis
Mraedis•4mo ago
well it boils down to either don't use NFS or don't enable file watching What do you need file watching for anyway?
etnoy
etnoy•4mo ago
File watching kind of sucks imo, just rescan when needed
ogokcocoball
ogokcocoballOP•4mo ago
This is because the user cannot be granted manual scanning rights. I don't know if it's different now, but when I tested it before, it seemed to be consuming too much resources for one scan. So I'm not reducing the scan cycle to another 8 hours.
Mraedis
Mraedis•4mo ago
External libraries aren't meant to be scanned every hour anyway
ogokcocoball
ogokcocoballOP•4mo ago
No description
ogokcocoball
ogokcocoballOP•4mo ago
It's a bit of a shame that I have to wait up to 8 hours to share pictures with my friends after the trip. I want to reduce the scan cycle to less than 1 hour, but the cpu usage is huge as shown in the graph.
Mraedis
Mraedis•4mo ago
Is that the scan being huge or just the machine learning processing new assets
ogokcocoball
ogokcocoballOP•4mo ago
The impact of machine learning is huge. I want to do machine learning work in multiple times using real-time scanning. I used to use 100% of cpu occupancy just with scans without a new asset, but I don't think so anymore. Still, it's too inefficient to use more than 10 minutes for a single scan. I pressed the scan button for the test, but it still hasn't shut down.
ogokcocoball
ogokcocoballOP•4mo ago
No description
ogokcocoball
ogokcocoballOP•4mo ago
It took me 30 minutes to simply re-scan. This is why I want a real-time scan.
No description

Did you find this page helpful?