HTTP Fetch Timeouts
HTTP fetch timeouts
Canonical page: https://docs.seda.xyz/home/for-agents/modules/12-http-fetch-timeouts
Source file: modules/12-http-fetch-timeouts.md (label only, do not fetch)
Authoritative reference:
This page exists to prevent flaky Oracle Programs caused by slow upstream APIs.
Default values (do not assume otherwise)
Per-request timeout: 2,000ms
Global timeout budget across all HTTP requests: 20,000ms
Meaning:
Each individual HTTP request defaults to failing after ~2 seconds.
Across the entire Oracle Program execution, all HTTP requests share a combined maximum budget of ~20 seconds.
Why this matters
If your upstream frequently takes longer than 2 seconds, requests will fail unless you explicitly set a per-request timeout.
However, increasing timeouts too much can cause you to hit the global 20s budget if you make multiple requests.
How to set a per-request timeout (Rust)
Copy/paste example:
When to increase timeout
Increase timeout_ms when the upstream is expected to be slower, for example:
AI/ML services (often 3–5 seconds)
heavy data processing APIs
slow but reliable providers
Agent action (do this every time you add an HTTP call)
Action checklist:
Estimate upstream p95 latency (rough guess is fine).
Set
timeout_msslightly above that p95 (e.g., p95=2.4s → timeout=3.0s).Count how many HTTP calls the Oracle Program makes in one execution.
Ensure the total worst-case time across calls stays within the 20,000ms global budget.
Checkpoint:
You can state the chosen
timeout_msand why.You can justify that the number of HTTP calls will not exceed the global 20s budget.
Authoritative references:
- Operating and Running a Data Proxy: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/operating-and-running-a-data-proxy
- Data Proxy overview: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/introduction-to-data-proxy
- Enabling SEDA Fast on a Data Proxy: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/enabling-seda-fast-on-a-data-proxy
- Advanced: API-key Gated Data (proxyHttpFetch): https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/advanced-api-key-gated-data
- System requirements: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/system-requirements
- Scaling up: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/scaling-up
- Debugging: https://docs.seda.xyz/home/for-data-providers/operating-a-data-proxy/debugging
Last updated
Was this helpful?

