thedotmack/claude-mem · warning
Pull wedged: the same page keeps failing; backing off and…
Error message
Pull wedged: the same page keeps failing; backing off and retrying
What it means
SyncClient pull loop failed to advance: the same page cursor failed three or more consecutive times. Instead of crashing, the client logs a warning and applies exponential backoff (doubling from backoffInitialMs up to backoffMaxMs) before retrying the same cursor.
Solutions
- Wait — the client retries automatically with exponential backoff; check hub health in the meantime.
- Inspect the logged `cursor` and `err` to see whether the failure is network-level or a hub data error.
- If a specific page always fails (hub data bug), fix/remove the offending records on the hub or reset the epoch/cursor to force a re-pull.
- Check hub logs and connectivity (DNS, VPN, proxy) if backoff never recovers.
Defensive patterns
Strategy: retry
Validate before calling
async function canReachHub(url) {
try { const r = await fetch(url + '/health'); return r.ok; } catch { return false; }
} Try / catch
try {
await client.pullPage(cursor);
} catch (err) {
if (err instanceof Error && client.failStreak >= 3) {
await sleep(client.backoffMs); // client already backs off; just wait
}
} Prevention
- Monitor hub availability and restart it proactively
- Keep backoffMaxMs sane so retries never hammer a down hub
- Alert on failStreak >= 3 instead of discovering it in logs
When it happens
Trigger: The pull request for a given cursor throws repeatedly (>=3 consecutive failures on the same page) — e.g. persistent 5xx responses, network outage, or a corrupt/hub-side page that always errors.
Common situations: Hub server briefly down or restarting; network partition on a laptop; a hub bug that makes one specific page always fail; rate limiting responses.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- sync hub pull
- chroma-mcp connection in backoff
- Cloud sync flush failed; unsynced rows remain queued
- pull
- push response did not ack the canary op
AI-assisted analysis of thedotmack/claude-mem@d8bc9755e7 (2026-09-17).
Data as JSON: /api/errors/b04227a30fd2e278.
Report an issue: GitHub.
Appendix: source
Thrown at src/services/sync/SyncClient.ts:888
* unmoved — log distinctly so the wedge is visible in the logs.
*/
private recordFailure(error: unknown): void {
const err = error instanceof Error ? error : new Error(String(error));
let cursor: string | null = null;
try {
cursor = this.apply.getCursor();
} catch { /* DB may be closing — cursor stays null */ }
if (cursor === this.failCursor) {
this.failStreak++;
} else {
this.failCursor = cursor;
this.failStreak = 1;
}
this.backoffMs = this.backoffMs === 0
? this.backoffInitialMs
: Math.min(this.backoffMs * 2, this.backoffMaxMs);
if (this.failStreak >= 3) {
logger.warn('SYNC_CLIENT', 'Pull wedged: the same page keeps failing; backing off and retrying', {
cursor,
failStreak: this.failStreak,
backoffMs: this.backoffMs,
}, err);
} else {
logger.debug('SYNC_CLIENT', 'Pull failed (non-blocking; will retry)', {
cursor,
backoffMs: this.backoffMs,
}, err);
}
}
}
View on GitHub (pinned to d8bc9755e7)