# Page sync retries transient fetch failures with backoff

> Agno page sync now gives every page and index fetch up to five attempts, each with its own timeout and a jittered exponential backoff, so a dropped connection on one page stops failing the run.

- Published: 2026-10-02
- Author: Kaustubh Shukla
- Categories: Changelog
- Canonical: https://www.agno.com/blog/page-sync-retries-transient-fetch-failures-with-backoff
- Markdown: https://www.agno.com/blog/page-sync-retries-transient-fetch-failures-with-backoff.md

`PageSource.fetch` in Agno, which loads every page and nested index during `Knowledge.sync_pages`, now abandons a stalled connection after 5 seconds and retries it on a fresh one. Syncing docs.agno.com used to fail one or two random pages per run with `Connection reset by peer`. A hung TLS handshake ate the whole 30 second fetch deadline, so no retry could run.

|                     | Earlier releases                       | This release                                         |
| ------------------- | -------------------------------------- | ---------------------------------------------------- |
| Attempts            | 3                                      | 5                                                    |
| Timeout per attempt | whatever remained of the 30 s deadline | 5 s to connect; 10 s read, write and pool timeouts   |
| Waits               | 0.25 s, 0.5 s                          | about 0.5, 1, 2, 4 s, each times a random 0.5 to 1.0 |
| `Retry-After`       | ignored                                | honored on 429 and 5xx, capped at 10 s               |
| Dropped connections | failed                                 | retried (`RemoteProtocolError`, `WriteError`)        |

The 30 second deadline still caps each fetch, and a retry that would wait past it fails right away with the transport error as its cause. On the deployment that hit the bug, the stalled handshake timed out at 5 seconds, the second attempt succeeded, and the sync finished with 0 failed pages. Class attributes on `PageSource`, such as `fetch_attempts` and `attempt_timeout_seconds`, tune the policy.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/27_public_pages/README.md), and learn more about [syncing published pages](https://docs.agno.com/knowledge/published-pages#synchronize-published-markdown) in the documentation.
