[BUG] iOS background backup stalls after a few photos, and those few photos don't actually upload #1421

Closed
opened 2026-02-05 01:45:38 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @achusuresh2 on GitHub (Oct 5, 2023).

The bug

I have never been able to keep background uploads working beyond a few photos. Once the upload starts, I see the notification count up for a few photos and then it just remains there. I get no notification of background upload failed, the number just never increases after that. No new backup is initiated after this happens either. Eventually, when I open the app, I found that the photos remaining number didn't even change by the few photos the background upload claimed to upload.

The OS that Immich Server is running on

Application on TrueNAS Scale

Version of Immich Server

1.80.0

Version of Immich Mobile App

1.80.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

No docker-compose file, running in TreuNAS scale. 
Config shown in additional information

Your .env content

No .env file

Reproduction steps

1. Turn on background uploads
2. Leave the app and wait for uploads to start
3. Uploads will start and stall after a few photos
4. Photos remaining will be unchanged when app is eventually reopened.

Additional information

TrueNAS Scale Application Config

Immich Configuration

Timezone
'America/Toronto' timezone
Public Login Message

Enable Machine Learning - enabled
Enable Typesense - enabled

Network Configuration

Web Port
[PORT]

Storage Configuration

help_outline
Immich Uploads Storage
ixVolume (Dataset created automatically by the system)

Immich Library Storage
ixVolume (Dataset created automatically by the system)

Immich Thumbs Storage
ixVolume (Dataset created automatically by the system)

Immich Profile Storage
ixVolume (Dataset created automatically by the system)

Immich Video Storage
ixVolume (Dataset created automatically by the system)

Additional Libraries
No items have been added yet.

Immich Postgres Data Storage
ixVolume (Dataset created automatically by the system)

Immich Postgres Backup Storage
ixVolume (Dataset created automatically by the system)

Resources Configuration

Limits
CPU
4000m

Memory
8Gi

Originally created by @achusuresh2 on GitHub (Oct 5, 2023). ### The bug I have never been able to keep background uploads working beyond a few photos. Once the upload starts, I see the notification count up for a few photos and then it just remains there. I get no notification of background upload failed, the number just never increases after that. No new backup is initiated after this happens either. Eventually, when I open the app, I found that the photos remaining number didn't even change by the few photos the background upload claimed to upload. ### The OS that Immich Server is running on Application on TrueNAS Scale ### Version of Immich Server 1.80.0 ### Version of Immich Mobile App 1.80.0 ### Platform with the issue - [ ] Server - [ ] Web - [X] Mobile ### Your docker-compose.yml content ```YAML No docker-compose file, running in TreuNAS scale. Config shown in additional information ``` ### Your .env content ```Shell No .env file ``` ### Reproduction steps ```bash 1. Turn on background uploads 2. Leave the app and wait for uploads to start 3. Uploads will start and stall after a few photos 4. Photos remaining will be unchanged when app is eventually reopened. ``` ### Additional information TrueNAS Scale Application Config Immich Configuration Timezone 'America/Toronto' timezone Public Login Message Enable Machine Learning - enabled Enable Typesense - enabled Network Configuration Web Port [PORT] Storage Configuration help_outline Immich Uploads Storage ixVolume (Dataset created automatically by the system) Immich Library Storage ixVolume (Dataset created automatically by the system) Immich Thumbs Storage ixVolume (Dataset created automatically by the system) Immich Profile Storage ixVolume (Dataset created automatically by the system) Immich Video Storage ixVolume (Dataset created automatically by the system) Additional Libraries No items have been added yet. Immich Postgres Data Storage ixVolume (Dataset created automatically by the system) Immich Postgres Backup Storage ixVolume (Dataset created automatically by the system) Resources Configuration Limits CPU 4000m Memory 8Gi
Author
Owner

@alextran1502 commented on GitHub (Oct 5, 2023):

If you don't see the assets get uploaded, then probably the server has issues. Can you upload some assets on the web interface and verify if you can see them?

@alextran1502 commented on GitHub (Oct 5, 2023): If you don't see the assets get uploaded, then probably the server has issues. Can you upload some assets on the web interface and verify if you can see them?
Author
Owner

@achusuresh2 commented on GitHub (Oct 5, 2023):

Hey,

Yes, I can confirm that uploads using the web interface work, and uploads using the CLI tool also work. Also, any items uploaded by the foreground process (except one very large video I have - not sure why this isn't working) seem to upload just fine.

For me personally, the background upload seems to stall after around 9 items usually.

@achusuresh2 commented on GitHub (Oct 5, 2023): Hey, Yes, I can confirm that uploads using the web interface work, and uploads using the CLI tool also work. Also, any items uploaded by the foreground process (except one very large video I have - not sure why this isn't working) seem to upload just fine. For me personally, the background upload seems to stall after around 9 items usually.
Author
Owner

@achusuresh2 commented on GitHub (Oct 5, 2023):

I was reading through the FAQs and noticed that video uploads can have issues when using a Cloudflare tunnel due to the size limit, and that's what I've been using. But I've been having issues with both photos and videos, but could this still be a part of it perhaps?

@achusuresh2 commented on GitHub (Oct 5, 2023): I was reading through the FAQs and noticed that video uploads can have issues when using a Cloudflare tunnel due to the size limit, and that's what I've been using. But I've been having issues with both photos and videos, but could this still be a part of it perhaps?
Author
Owner

@alextran1502 commented on GitHub (Oct 5, 2023):

The background task can only run about 10-15 seconds for each invocation, and this is the allowable time that iOS allows for short background tasks to run.

@alextran1502 commented on GitHub (Oct 5, 2023): The background task can only run about 10-15 seconds for each invocation, and this is the allowable time that iOS allows for short background tasks to run.
Author
Owner

@achusuresh2 commented on GitHub (Oct 5, 2023):

So could it be that a single large file could result in the same file failing to upload multiple times in the background instead of moving on to other files?

@achusuresh2 commented on GitHub (Oct 5, 2023): So could it be that a single large file could result in the same file failing to upload multiple times in the background instead of moving on to other files?
Author
Owner

@alextran1502 commented on GitHub (Oct 5, 2023):

Potentially, but in foreground context, we purposely upload photos first, then videos. Perhaps it could be a really large raw file? 🤔

@alextran1502 commented on GitHub (Oct 5, 2023): Potentially, but in foreground context, we purposely upload photos first, then videos. Perhaps it could be a really large raw file? 🤔
Author
Owner

@achusuresh2 commented on GitHub (Oct 16, 2023):

I was able to get past it by just leaving the app open in the foreground and now the uploads seem to be working now that I don't have as many files to upload in one go. So maybe this issue can be closed for now.

@achusuresh2 commented on GitHub (Oct 16, 2023): I was able to get past it by just leaving the app open in the foreground and now the uploads seem to be working now that I don't have as many files to upload in one go. So maybe this issue can be closed for now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1421