Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/cli/server, rpc: lower down http readtimeout to 10s #777

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/files/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/example_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ethstats = "" # Reporting URL of a ethstats service (nodename:sec
vhosts = ["localhost"] # Comma separated list of virtual hostnames from which to accept requests (server enforced). Accepts '*' wildcard.
corsdomain = ["localhost"] # Comma separated list of domains from which to accept cross origin requests (browser enforced)
[jsonrpc.timeouts]
read = "30s"
read = "10s"
write = "30s"
idle = "2m0s"

Expand Down
2 changes: 1 addition & 1 deletion internal/cli/server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ func DefaultConfig() *Config {
VHost: []string{"localhost"},
},
HttpTimeout: &HttpTimeouts{
ReadTimeout: 30 * time.Second,
ReadTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second,
IdleTimeout: 120 * time.Second,
},
Expand Down
2 changes: 1 addition & 1 deletion packaging/templates/mainnet-v1/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ gcmode = "archive"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
2 changes: 1 addition & 1 deletion packaging/templates/testnet-v4/archive/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ gcmode = "archive"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ syncmode = "full"
# vhosts = ["*"]
# corsdomain = ["*"]
# [jsonrpc.timeouts]
# read = "30s"
# read = "10s"
# write = "30s"
# idle = "2m0s"

Expand Down
2 changes: 1 addition & 1 deletion rpc/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type HTTPTimeouts struct {
// DefaultHTTPTimeouts represents the default timeout values used if further
// configuration is not provided.
var DefaultHTTPTimeouts = HTTPTimeouts{
ReadTimeout: 30 * time.Second,
ReadTimeout: 10 * time.Second,
WriteTimeout: 30 * time.Second,
IdleTimeout: 120 * time.Second,
}
Expand Down