Skip to content

Commit a3156ea

Browse files
committed
fix(ponder): 30s RPC transport timeout
1 parent ab2f18f commit a3156ea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/indexer-ponder/ponder.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createConfig } from 'ponder';
2+
import { http, fallback } from 'viem';
23
import { config } from './src/config';
34
import {
45
RollupABI,
@@ -22,7 +23,10 @@ export default createConfig({
2223
chains: {
2324
[config.NETWORK_TYPE]: {
2425
id: config.CHAIN_ID,
25-
rpc: config.RPC_URLS
26+
// Wrap each RPC URL in an http transport with a 30s timeout (viem's default
27+
// is 10s, which abandons requests the upstream RPC/eRPC would still complete
28+
// within its ~30s budget). fallback() keeps multi-URL failover.
29+
rpc: fallback(config.RPC_URLS.map((url) => http(url, { timeout: 30_000 }))),
2630
},
2731
},
2832
contracts: {

0 commit comments

Comments
 (0)