Skip to content

Commit 381f22e

Browse files
committed
ipfs: Lower default timeout
To avoid hitting external timeouts from gateways, since we rely on timing out on our side to detect a missing file.
1 parent b3b74d8 commit 381f22e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/src/link_resolver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ lazy_static! {
3838

3939
/// The timeout for IPFS requests in seconds
4040
static ref IPFS_TIMEOUT: Duration = Duration::from_secs(
41-
read_u64_from_env("GRAPH_IPFS_TIMEOUT").unwrap_or(60)
41+
read_u64_from_env("GRAPH_IPFS_TIMEOUT").unwrap_or(30)
4242
);
4343
}
4444

docs/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ those.
5151
- `GRAPH_IPFS_SUBGRAPH_LOADING_TIMEOUT`: timeout for IPFS requests made to load
5252
subgraph files from IPFS (in seconds, default is 60).
5353
- `GRAPH_IPFS_TIMEOUT`: timeout for IPFS requests from mappings using `ipfs.cat`
54-
or `ipfs.map` (in seconds, default is 60).
54+
or `ipfs.map` (in seconds, default is 30).
5555
- `GRAPH_MAX_IPFS_FILE_BYTES`: maximum size for a file that can be retrieved
5656
with `ipfs.cat` (in bytes, default is unlimited)
5757
- `GRAPH_MAX_IPFS_MAP_FILE_SIZE`: maximum size of files that can be processed

0 commit comments

Comments
 (0)