Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android App Keeps (trying) to upload the same file over and over #9697

Closed
1 of 3 tasks
leocb opened this issue May 23, 2024 · 3 comments
Closed
1 of 3 tasks

Android App Keeps (trying) to upload the same file over and over #9697

leocb opened this issue May 23, 2024 · 3 comments

Comments

@leocb
Copy link
Contributor

leocb commented May 23, 2024

The bug

On the mobile App, I have a big video file (about 1.4Gb) that the app tries to upload everytime I open the App, background sync doesn't show this upload. If I watch the upload process, it gets to 100% and then gets stuck.
It's just this file in particular, other photos are being uploaded and processed normally

The OS that Immich Server is running on

Ubuntu 22.10

Version of Immich Server

v1.105.1

Version of Immich Mobile App

v1.105.1 build.139

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    user: 1000:3000
    command: ['start.sh', 'immich']
    volumes:
      - ${LIBRARY_LOCATION}:/usr/src/app/upload/library
      - ${UPLOAD_LOCATION}:/usr/src/app/upload/upload
      - ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
      - ${PROFILE_LOCATION}:/usr/src/app/upload/profile
      - ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
      - ${OLD_PHOTOS_LOCATION}:/mnt/dropbox/photos
      - /etc/localtime:/etc/localtime:ro

    env_file:
      - stack.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}
    user: 1000:3000
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    # bellow is copied from the hw yml file, using vaapi (AMD)
    devices:
      - /dev/dri:/dev/dri
    # end of copy
    command: ['start.sh', 'microservices']
    volumes:
      - ${LIBRARY_LOCATION}:/usr/src/app/upload/library
      - ${UPLOAD_LOCATION}:/usr/src/app/upload/upload
      - ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
      - ${PROFILE_LOCATION}:/usr/src/app/upload/profile
      - ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
      - ${OLD_PHOTOS_LOCATION}:/mnt/dropbox/photos
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    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:
      - ${LIBRARY_LOCATION}:/usr/src/app/upload/library
      - ${UPLOAD_LOCATION}:/usr/src/app/upload/upload
      - ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
      - ${PROFILE_LOCATION}:/usr/src/app/upload/profile
      - ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
      - ${OLD_PHOTOS_LOCATION}:/mnt/dropbox/photos
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/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
    command: ["postgres", "-c" ,"shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]


volumes:
  model-cache:

Your .env content

Portainer screenshot: ![image](https://github.com/immich-app/immich/assets/8310271/fe876292-f9f1-4af2-9927-9540dae0da2f)

Reproduction steps

1. Open the App
2. See the cloud icon is synching something, tap on it
3. file gets to 100% then gets stuck

Relevant log output

No response

Additional information

No response

@schuhbacca
Copy link

Are you connecting to the server directly via ip:port when attempting to upload this file?

@leocb
Copy link
Contributor Author

leocb commented May 23, 2024

No, I'm using a cloudflare tunnel to my home server.

While investigating, I found out cloudflare has a upload size limit for tunnels, didn't know that.

I also don't care that it doesn't work over the internet as long as it works on my local network; I'm currently setting up a custom DNS hostname on my router (and all the nginx ssl and file limit stuff) to connect directly to the server when I'm at home. Will update this if this solves the problem.

@leocb
Copy link
Contributor Author

leocb commented May 23, 2024

Doing the above solved my issue. It seems that cloudflare tunnel does something weird when the file is >100mb, looks like a time out, but takes about 3 minutes to do so.

To anyone who wants to replicate this, my current setup is:

WAN access: photos.mydomain.com -> cloudflare tunnel -> docker instance -> immich
LAN access: photos.mydomain.com -> fixed DNS hostname on the router pointing to my server LAN IP -> nginx (with let's encrypt ssl using cloudflare dns api) -> docker instance -> immich

with this, internet backup of large files fails, but as soon as I reach my home network (or as soon as DNS caches clears out), it works again.

@leocb leocb closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants