Skip to content

WebDAV: Reset error flags/counters after transient failures #1781

@daniel-callejas-sevilla

Description

WebDAV sync (from a Nextcloud source towards PhotoPrism) gets permanently blocked once a file download fails more than three times. There is no way to have it resume (even when removing the offending file from the Nextcloud source). Once this "failed more than 3 times" state is reached, Photoprism will not attempt any further WebDAV exchange even after restarts. Disabling the sync in settings and enabling it back again does not help.

Additionally, this "will not try ever again" mode is fully invisible in the UI and info logs, and can only be detected with debug logs. The info logs give the impression that the sync is starting.

Workaround: delete the whole WebDAV server from settings and add it back again. Synchronization then resumes normally.

Expected behavior: Photoprism continues to attempt synchronization forever. If a specific file fails to be retrieved more than X times, the user is informed, and Photoprism continues to attempt synchronization anyway, at the scheduled interval (PHOTOPRISM_WAKEUP_INTERVAL).

Offending log lines:

photoprism_1  | time="2021-11-29T21:53:07Z" level=info msg="sync: downloading from Owncloud"
photoprism_1  | time="2021-11-29T21:53:07Z" level=debug msg="sync: downloading /photoprism_root/telephone_dani/NextcloudInstantUpload/DCIM/2019/12/VID_20191224_010317.mp4 failed more than 3 times"

(That specific file failed to download hours earlier due to a transient issue with my Nextcloud server. That file was then removed from the Nextcloud source and did not exist anymore at the logged timestamp.)

Edit: Running PhotoPrism® 211010-83b4f783-Linux-x86_64

Metadata

Metadata

Assignees

Labels

enhancementEnhancement or improvement of an existing featurereleasedAvailable in the stable release

Type

No type

Projects

Status

Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions