synfinatic / helium-analysis

Tools for hotspot placement optimization
GNU General Public License v3.0
8 stars 1 forks source link

Got origin too busy error while --init-db and while refresh #40

Closed magerata closed 2 years ago

magerata commented 2 years ago

Hi Synfinatic I was running; helium-analysis-0.9.1-windows-amd64.exe on a 64bit win 7 machine and got this error. Ran refresh and ended up with the same error. Cut and paste of the console below. Thanks M

time="2021-12-03T00:02:19-08:00" level=info msg="Loaded 32000 hotspots" time="2021-12-03T00:02:21-08:00" level=info msg="Loaded 33000 hotspots" time="2021-12-03T00:02:22-08:00" level=panic msg="Unable to fetch hotspots" error="Error 429: {\"error\":\"Too Busy\",\" come_back_in_ms\":5206}" panic: (logrus.Entry) 0xc000f86230 [recovered] panic: (logrus.Entry) 0xc000f86230

goroutine 1 [running]: github.com/alecthomas/kong.catch(0xc00008fef0) /Users/aturner/go/pkg/mod/github.com/alecthomas/kong@v0.2.16/kong.go:383 +0xbc panic(0x8efd20, 0xc000f86230) /usr/local/Cellar/go/1.15.6/libexec/src/runtime/panic.go:969 +0x1c7 github.com/sirupsen/logrus.Entry.log(0xc000112000, 0xc0001c86c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /Users/aturner/go/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:255 +0x32d github.com/sirupsen/logrus.(Entry).Log(0xc000f861c0, 0x0, 0xc00008f8a0, 0x1, 0x1) /Users/aturner/go/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:283 +0xf2 github.com/sirupsen/logrus.(Entry).Logf(0xc000f861c0, 0x0, 0x9005a1, 0x18, 0x0, 0x0, 0x0) /Users/aturner/go/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:329 +0xed github.com/sirupsen/logrus.(Entry).Panicf(...) /Users/aturner/go/pkg/mod/github.com/sirupsen/logrus@v1.7.0/entry.go:367 main.(HotspotsRefreshCmd).Run(0xc0001384a8, 0xc0001a9c60, 0x0, 0x0) /Users/aturner/go/src/github.com/synfinatic/helium-analysis/cmd/hotspots.go:66 +0xcf reflect.Value.call(0x87f500, 0xc0001384a8, 0x213, 0x8f766c, 0x4, 0xc0001a9e00, 0x1, 0x1, 0x1, 0x0, ...) /usr/local/Cellar/go/1.15.6/libexec/src/reflect/value.go:476 +0x8e7 reflect.Value.Call(0x87f500, 0xc0001384a8, 0x213, 0xc0001a9e00, 0x1, 0x1, 0x0, 0x1, 0x10) /usr/local/Cellar/go/1.15.6/libexec/src/reflect/value.go:337 +0xc5 github.com/alecthomas/kong.callMethod(0x8f7331, 0x3, 0x888280, 0xc0001384a8, 0x199, 0x87f500, 0xc0001384a8, 0x213, 0xc00 01ab740, 0x0, ...) /Users/aturner/go/pkg/mod/github.com/alecthomas/kong@v0.2.16/callbacks.go:71 +0x4b1 github.com/alecthomas/kong.(Context).RunNode(0xc000156100, 0xc00016c460, 0xc00010ff48, 0x1, 0x1, 0x40e85f, 0x20) /Users/aturner/go/pkg/mod/github.com/alecthomas/kong@v0.2.16/context.go:706 +0x58f github.com/alecthomas/kong.(Context).Run(0xc000156100, 0xc00010ff48, 0x1, 0x1, 0x0, 0x0) /Users/aturner/go/pkg/mod/github.com/alecthomas/kong@v0.2.16/context.go:723 +0xa5 main.main() /Users/aturner/go/src/github.com/synfinatic/helium-analysis/cmd/main.go:94 +0x272

synfinatic commented 2 years ago

The API servers have been melting down a lot lately trying to keep up with the chain and all the requests from the wallet app/etc. I honestly don't have a good suggestion at this point other than keep trying or wait for them to be resolved?

I once looked at what it would take to run a follower for the blockchain so it wouldn't need to talk to the API servers and the answer was "two really big servers costing $$$$"

synfinatic commented 2 years ago

So I added backoff & retry logic and released 0.9.2. Should be able to complete now.