#7265·duplicati

Memory leak / OOM with --photos-handling=PhotosAndLibrary persists on 2.3.0.4 for fully local (non-iCloud) Photos library

Author: Doktor-Mac-DMCreated Sep 2, 2026Updated Sep 2, 2026

Environment

  • Duplicati version: 2.3.0.4_stable_2026-07-09
  • OS: macOS Tahoe 26.6.2
  • Hardware: Mac Studio, 48 GB RAM
  • Backend: S3-compatible (Hetzner Object Storage)
  • Photos library: fully local, iCloud Photos not enabled, "Optimize Mac Storage" not applicable

Description The 2.3.0.4 release notes state a memory leak when backing up the macOS Photos library was fixed. I'm still seeing the same symptom on a job backing up ~215 GB Photos Library.photoslibrary with default --photos-handling (PhotosAndLibrary):

  • No error surfaced in the Duplicati log
  • Backup never completes
  • Swap usage climbs to ~47.6 GB during the run (system essentially fully swapped)
  • Backup versions accumulated rapidly without completing (141 versions before I intervened, vs. 12-14 on two other jobs of similar cadence)

Since I don't use iCloud Photos at all, this points at the PHAsset enumeration path itself (PhotosKit interop) leaking, independent of any iCloud on-demand download behavior.

Workaround Setting --photos-handling=LibraryOnly on the job fully resolves it: memory stays flat, backup completes, destination size normalized to match actual source size (~215-218 GB) after a subsequent Repair/list-broken-files/Compact pass.

Steps to reproduce

  1. Configure a backup job for ~/Pictures/Photos Library.photoslibrary with default --photos-handling (PhotosAndLibrary) on a large, fully local library
  2. Run the backup
  3. Observe memory/swap climbing continuously and the run never completing

Related: #6381 / #6638 (original feature design/implementation for macOS Photos support)