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

Fix visor RPC timeouts #454

Merged
merged 2 commits into from
Jul 31, 2020
Merged
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
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.14

require (
github.com/AudriusButkevicius/pfilter v0.0.0-20190627213056-c55ef6137fc6
github.com/SkycoinProject/dmsg v0.2.3-0.20200626071453-e2e73212a9ab
github.com/SkycoinProject/dmsg v0.2.3
github.com/SkycoinProject/skycoin v0.27.0
github.com/SkycoinProject/yamux v0.0.0-20191213015001-a36efeefbf6a
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
Expand All @@ -20,7 +20,6 @@ require (
github.com/mmcloughlin/avo v0.0.0-20200523190732-4439b6b2c061 // indirect
github.com/pkg/profile v1.5.0
github.com/prometheus/client_golang v1.7.1
github.com/prometheus/common v0.10.0 // indirect
github.com/rakyll/statik v0.1.7
github.com/schollz/progressbar/v2 v2.15.0
github.com/shirou/gopsutil v2.20.5+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/AudriusButkevicius/pfilter v0.0.0-20190627213056-c55ef6137fc6 h1:Apvc
github.com/AudriusButkevicius/pfilter v0.0.0-20190627213056-c55ef6137fc6/go.mod h1:1N0EEx/irz4B1qV17wW82TFbjQrE7oX316Cki6eDY0Q=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/SkycoinProject/dmsg v0.2.3-0.20200626071453-e2e73212a9ab h1:Tk6A+wHK/geAOZcwcvpKsVRtEGz91y2FM6Y6ePtt0/M=
github.com/SkycoinProject/dmsg v0.2.3-0.20200626071453-e2e73212a9ab/go.mod h1:qLrCsFiggHokPHyHH8069v6DawaD16SiUc8ml9W7CEo=
github.com/SkycoinProject/dmsg v0.2.3 h1:x6Wok/CXnAWdngMQ1q0sOiP81r9G21EeP4jnDfxEEJk=
github.com/SkycoinProject/dmsg v0.2.3/go.mod h1:qLrCsFiggHokPHyHH8069v6DawaD16SiUc8ml9W7CEo=
github.com/SkycoinProject/skycoin v0.27.0 h1:N3IHxj8ossHOcsxLYOYugT+OaELLncYHJHxbbYLPPmY=
github.com/SkycoinProject/skycoin v0.27.0/go.mod h1:xqPLOKh5B6GBZlGA7B5IJfQmCy7mwimD9NlqxR3gMXo=
github.com/SkycoinProject/yamux v0.0.0-20191213015001-a36efeefbf6a h1:6nHCJqh7trsuRcpMC5JmtDukUndn2VC9sY64K6xQ7hQ=
Expand Down
7 changes: 4 additions & 3 deletions pkg/skyenv/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ const (

// RPC constants.
const (
DefaultRPCAddr = "localhost:3435"
DefaultRPCTimeout = 20 * time.Second
LongRPCTimeout = 5 * time.Minute // update requires huge timeout
DefaultRPCAddr = "localhost:3435"
DefaultRPCTimeout = 20 * time.Second
TransportRPCTimeout = 1 * time.Minute
UpdateRPCTimeout = 6 * time.Hour // update requires huge timeout
)

// Default skywire app server and discovery constants
Expand Down
6 changes: 4 additions & 2 deletions pkg/visor/rpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,10 @@ func (rc *rpcClient) Call(method string, args, reply interface{}) error {
timeout := rc.timeout

switch method {
case "Update", "AddTransport":
timeout = skyenv.LongRPCTimeout
case "AddTransport":
timeout = skyenv.TransportRPCTimeout
case "Update":
timeout = skyenv.UpdateRPCTimeout
}

if timeout != 0 {
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/SkycoinProject/dmsg/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions vendor/github.com/SkycoinProject/dmsg/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

297 changes: 297 additions & 0 deletions vendor/github.com/SkycoinProject/dmsg/cmdutil/service_flags.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions vendor/github.com/SkycoinProject/dmsg/disc/entry.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading