Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Download breaks with panic frequently #48

Open
baskinsy opened this issue Feb 25, 2022 · 1 comment
Open

Download breaks with panic frequently #48

baskinsy opened this issue Feb 25, 2022 · 1 comment

Comments

@baskinsy
Copy link

baskinsy commented Feb 25, 2022

Hello and thanks for this nice tool. I'm getting the following problem on hotspots refresh and download breaks completely. It can happen multiple times and makes it very difficult to download the hotspots db.

PANI[1514] Unable to fetch hotspots                      error="Error 503: {\"error\":\"Too Busy\"}"
panic: (*logrus.Entry) 0xc0001861c0 [recovered]
        panic: (*logrus.Entry) 0xc0001861c0

goroutine 1 [running]:
github.com/alecthomas/kong.catch(0xc008967e88)
        /home/stratos/go/pkg/mod/github.com/alecthomas/[email protected]/kong.go:383 +0xa5
panic({0x82dfe0, 0xc0001861c0})
        /usr/lib64/go/1.17/src/runtime/panic.go:1038 +0x215
github.com/sirupsen/logrus.Entry.log({0xc0000aa000, 0xc0057fa330, {0x0, 0x0, 0x0}, 0x0, 0x0, {0x0, 0x0}, 0x0, ...}, ...)
        /home/stratos/go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:255 +0x2b3
github.com/sirupsen/logrus.(*Entry).Log(0xc000186150, 0x0, {0xc008967480, 0x0, 0x0})
        /home/stratos/go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:283 +0xa8
github.com/sirupsen/logrus.(*Entry).Logf(0xc000186150, 0x0, {0x83e0a7, 0x7cfda0}, {0x0, 0x0, 0x2})
        /home/stratos/go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:329 +0x85
github.com/sirupsen/logrus.(*Entry).Panicf(...)
        /home/stratos/go/pkg/mod/github.com/sirupsen/[email protected]/entry.go:367
main.(*HotspotsRefreshCmd).Run(0x1, 0xc00000f5f0)
        /home/stratos/Documents/Crypto/helium/helium-analysis/cmd/hotspots.go:66 +0x76
reflect.Value.call({0x7d1300, 0xc0000e2608, 0x18}, {0x8361a0, 0x4}, {0xc00000f6f8, 0x1, 0x0})
        /usr/lib64/go/1.17/src/reflect/value.go:556 +0x845
reflect.Value.Call({0x7d1300, 0xc0000e2608, 0x10}, {0xc00000f6f8, 0x1, 0x1})
        /usr/lib64/go/1.17/src/reflect/value.go:339 +0xc5
github.com/alecthomas/kong.callMethod({0x835ea3, 0x3}, {0x7d9b40, 0xc0000e2608, 0x3}, {0x7d1300, 0xc0000e2608, 0xc0000b5dd0}, 0x53585e)
        /home/stratos/go/pkg/mod/github.com/alecthomas/[email protected]/callbacks.go:71 +0x4e7
github.com/alecthomas/kong.(*Context).RunNode(0xc000180100, 0xc00018a460, {0xc0000b5f48, 0x1, 0x1})
        /home/stratos/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:706 +0x40b
github.com/alecthomas/kong.(*Context).Run(0xc0001a7714, {0xc0000b5f48, 0x1, 0x1})
        /home/stratos/go/pkg/mod/github.com/alecthomas/[email protected]/context.go:723 +0xa5
main.main()
        /home/stratos/Documents/Crypto/helium/helium-analysis/cmd/main.go:95 +0x351

Any possible solution I can try?

@synfinatic
Copy link
Owner

The issue is that the helium API servers are getting worse and worse.

Two quick options:

  1. Increase the retry count from 3 to a larger number:
    client.SetRetryCount(3).SetRetryAfter(heliumApiRetry).AddRetryCondition(
  2. Try using the stakejoy API servers and see if they're better:
    HOTSPOT_URL = "https://helium-api.stakejoy.com/v1/hotspots/%s"

At some point I suppose these should be CLI flags, but other life priorities right now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants