Skip to content

Commit

Permalink
fix: for performance at scale, reduce timeouts to 10 seconds or less …
Browse files Browse the repository at this point in the history
…in all cases
  • Loading branch information
gvelez17 committed Oct 10, 2024
1 parent 375d09a commit c35805f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/ipfs-connection-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as http from 'http'
import * as https from 'https'
import * as ipfs from '@ceramicnetwork/ipfs-daemon'

const IPFS_GET_TIMEOUT = 60000 // 1 minute
const IPFS_GET_TIMEOUT = 10000 // 10 seconds

const mergeOptions = mergeOpts.bind({ ignoreUndefined: true })

Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/utils/fetch-json.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mergeAbortSignals, TimedAbortSignal, abortable } from './abort-signal-utils.js'

const DEFAULT_FETCH_TIMEOUT = 60 * 1000 * 3 // 3 minutes
const DEFAULT_FETCH_TIMEOUT = 10 * 1000 // 10 seconds

export type FetchOpts = Partial<{
body: any
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { IReconApi } from './recon.js'
import { NodeMetrics } from '@ceramicnetwork/node-metrics'

const IPFS_GET_RETRIES = 3
const DEFAULT_IPFS_GET_SYNC_TIMEOUT = 30000 // 30 seconds per retry, 3 retries = 90 seconds total timeout
const DEFAULT_IPFS_GET_SYNC_TIMEOUT = 2000 // 2 seconds per retry, 3 retries = 6 seconds total timeout
const DEFAULT_IPFS_GET_LOCAL_TIMEOUT = 1000 // 1 second to get data from local ipfs store
const IPFS_MAX_COMMIT_SIZE = 256000 // 256 KB
const IPFS_RESUBSCRIBE_INTERVAL_DELAY = 1000 * 15 // 15 sec
Expand Down

0 comments on commit c35805f

Please sign in to comment.