Skip to content

Commit

Permalink
Increase default timeout to 120s (#186)
Browse files Browse the repository at this point in the history
This value should allow tracing of all transactions without faincg a
timeout. It's not a guarantee since hardware and a node's current load
will also affect tracing time.
  • Loading branch information
piersy authored Mar 1, 2022
1 parent a1a5c74 commit 4c61710
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Flags:
-h, --help help for run
--rpc.address string Listening address for http server
--rpc.port uint Listening port for http server (default 8080)
--rpc.reqTimeout duration Timeout for requests to this service, this also controls the timeout sent to the blockchain node for trace transaction requests (default 25s)
--rpc.reqTimeout duration Timeout for requests to this service, this also controls the timeout sent to the blockchain node for trace transaction requests (default 2m0s)
```

Every argument can be defined using environment variables using `ROSETTA_` prefix; and replacing `.` for `_`; for example:
Expand Down
2 changes: 1 addition & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func init() {
// RPC Service Flags
flagSet.Uint("rpc.port", 8080, "Listening port for http server")
flagSet.String("rpc.address", "", "Listening address for http server")
flagSet.Duration("rpc.reqTimeout", 25*time.Second, "Timeout for requests to this service, this also controls the timeout sent to the blockchain node for trace transaction requests")
flagSet.Duration("rpc.reqTimeout", 120*time.Second, "Timeout for requests to this service, this also controls the timeout sent to the blockchain node for trace transaction requests")

// Geth Service Flags
flagSet.String("geth.binary", "", "Path to the celo-blockchain binary")
Expand Down
2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var Node NodeConfig

func configureDefaults() {
// httpServer
viper.SetDefault("httpServer.requestTimeout", "25s")
viper.SetDefault("httpServer.requestTimeout", "120s")
viper.SetDefault("httpServer.port", "8080")
viper.SetDefault("httpServer.interface", "")

Expand Down

0 comments on commit 4c61710

Please sign in to comment.