WebDAV: survive rate limits on large shares

Nextcloud throttles bursty PROPFIND walks (429) and big trees exceeded the
3-minute sync budget — production's 1000+ file share failed intermittently
with 'unexpected answer (429)' and 'context deadline exceeded'. propfind now
retries 429/503 up to 3 times honoring Retry-After (capped 30s, ctx-bound,
linear backoff without the header), the directory walk paces 100ms between
PROPFINDs, and the engine sync budget grows to 6 minutes. Unit tests cover
recover-after-429 and the bounded attempt count; truncation semantics are
unchanged.
This commit is contained in:
Andrew S Erwin
2026-11-24 11:35:06 -06:00
parent dbf4a896c3
commit 3878dddaa7
4 changed files with 115 additions and 11 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ const (
tick = 5 * time.Minute // engine cadence
syncEvery = 30 * time.Minute // per-connection freshness target
perTick = 10 // connections claimed per tick
syncTimeout = 3 * time.Minute // one full reconcile
syncTimeout = 6 * time.Minute // one full reconcile (large walks pace + retry 429s)
lastErrCap = 500
dialBudget = 10 // outbound.Reserve window per owner (tests + syncs)
dialWindow = time.Minute