immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Web Interface shows broken image links on large external database

Open mblack4d opened this issue 1 year ago • 7 comments

The bug

I do have a large Google Database Export - 1 TB ~ 97000 Assets

Images below show the main web interface. Clicking on an image shows a large broken image. Downloading the image - provides the file. Hovering over a video as seen below will - preview the video. Clicking on the video will produce a broken image.

-- I did attempt to run the Thumbnail Job - it found 15000+ assets or so and then quit

image image

The OS that Immich Server is running on

Ubuntu 22.04.3 with Docker Compose

Version of Immich Server

1.91.4

Version of Immich Mobile App

n/a

Platform with the issue

  • [ ] Server
  • [X] Web
  • [ ] Mobile

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH}:/usr/src/app/external
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:b6124ab2e45cc332e16398022a411d7e37181f21ff7874835e0180f56a09e82a
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

# 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
EXTERNAL_PATH=/home/user/unraid_google

# 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_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Add external database of Large Assets ~ 97000 +
2. Browse to Web home page
3.
...

Additional information

VM hosted on Unraid 12 Core Xeon Passthrough - 8 Gig RAM No other services running on VM besides Immich required resources

mblack4d avatar Dec 30 '23 03:12 mblack4d

is the job still running? Can you get the server and microservices log?

alextran1502 avatar Dec 30 '23 03:12 alextran1502

I just pulled the most recent logs and attached below

to test - i created /upload/encoded-video and /upload/thumbs in the immich directory and started the Thumbs job again.

image It's Doing something image

but the directories I created are still empty...

immich server logs.txt

mblack4d avatar Dec 30 '23 04:12 mblack4d

Hmm why do you have to create those directories in the first place?

alextran1502 avatar Dec 30 '23 04:12 alextran1502

I don't think it was needed - I was doing that based off the error logs. Appears the directories were internal to the docker containers not the immich directory on Ubuntu

I'm seeing ffmpeg activities now in HTOP

image

I'll check again in the morning and see what happens

mblack4d avatar Dec 30 '23 04:12 mblack4d

Only a few pictures shown as I know these are nothing sensitive but the entire database looks like this. Hovering over videos plays the content but clicking in to them - just a black screen.

I have noticed my Database size is increasing slowly.

image

mblack4d avatar Dec 30 '23 16:12 mblack4d

@mblack4d did you manage to resolve this? I'm having the same issue and looking for a solution

FrankelJb avatar Apr 29 '24 11:04 FrankelJb

Found the solution here: https://github.com/immich-app/immich/issues/10710#issuecomment-2198574532

For me at least it was an immich_microservices container that was still around.

If you are on latest version without microservices container: docker ps Then if there is such a container: docker container stop immich_microservices

Then in the Jobs section of Administration clicking on GENERATE THUMBNAILS -> Missing immediately worked again and fixed the problem.

chromosapiens avatar Jul 08 '24 22:07 chromosapiens

Definitely make sure the microservices container has been removed. Definitely make sure it's not running and on an older version :laughing:. Also, job queuing and library scanning have both been improved since this issue was opened.

jrasm91 avatar Sep 06 '24 20:09 jrasm91