immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
48.25k stars 2.53k forks source link

Cannot upload video file above a certain size #13370

Closed LordSpectre closed 1 hour ago

LordSpectre commented 2 hours ago

The bug

Hi, I'm using immich from a long time now, but from version 1.117.0 I got a strange issue. The problem is that apparently I'm not able to upload to Immich server files above a certain size. Server has enough space and Immich has no problem to upload small file.

All photos ==> Upload correctly Video 3 seconds (19MB) ==> Upload correctly Video 11 seconds (64MB) ==> Upload correctly Video 15 seconds (91MB) ==> Upload correctly Video 20 seconds (118MB) ==> Failed to upload without apparently reasons Video 30 seconds (147MB) ==> Failed to upload without apparently reasons

So it seems above 100MB the upload fails and Immich try in an infinite loop to upload again and again the video file. And most important thing, the same video that fails from phone, got error also from web interface

The OS that Immich Server is running on

Ubuntu 24.04.1 LTS

Version of Immich Server

v1.117.0

Version of Immich Mobile App

v1.117.0 build 162

Platform with the issue

Your docker-compose.yml content

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/foto-nas:/mnt/foto-nas:rw
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    healthcheck:
      disable: true
    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:
    healthcheck:
      disable: true
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    restart: always

  database:
    healthcheck:
      disable: true
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    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:

Your .env content

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres
# The Immich version to use.
IMMICH_VERSION=release
# PostgreSQL password. Change it to a secure one.
DB_PASSWORD=postgres_pass

# The values below this line do not need to be changed
#######################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

1.Record a video above 100MB 2.Try to Upload

Relevant log output

MANUAL UPLOAD LOG:

2024-10-11 06:37:38.674284 | FINE     | socket_io_client:engine.Socket | flushing 1 packets in socket |
2024-10-11 06:37:38.674109 | FINE     | socket_io_client:engine.Socket | socket receive: type "ping", data "null" |
2024-10-11 06:37:13.587893 | FINE     | socket_io_client:engine.Socket | flushing 1 packets in socket |
2024-10-11 06:37:13.587625 | FINE     | socket_io_client:engine.Socket | socket receive: type "ping", data "null" |
2024-10-11 06:37:09.926129 | INFO     | ManualUploadNotifier | [_startUpload] Manual Upload Completed - success: 0, failed: 1 |

Additional information

No response

alextran1502 commented 1 hour ago

You are probably using a reverse proxy and don't have the body size setting setup correctly to allow large file. Please see the documentation below for reverse proxy

https://immich.app/docs/administration/reverse-proxy/