dcrdata icon indicating copy to clipboard operation
dcrdata copied to clipboard

Detect when connection to dcrd is not available and display outage http view

Open raedah opened this issue 7 years ago • 6 comments
trafficstars

When connection to dcrd is lost or unavailable, display a msg to web visitors about an outage.

raedah avatar Feb 22 '18 23:02 raedah

Currently a lost dcrd connection is bad news and there is currently a PR to disable autoreconnect: https://github.com/decred/dcrdata/pull/1130 In the future, a better solution that detects disconnect and reconnect can perhaps be implemented, but that's presently not straightforward.

chappjc avatar Mar 13 '19 22:03 chappjc

@chappjc, how do we want this to be? A mini banner with a message on the UI and a message to API consumers?

ukane-philemon avatar Dec 25 '22 23:12 ukane-philemon

I'd say something down at the bottom near the red/green indicator. Maybe orange with next next to it. But, meh

chappjc avatar Dec 26 '22 00:12 chappjc

I'd say something down at the bottom near the red/green indicator. Maybe orange with next next to it. But, meh

Okay, then how about API consumers?

ukane-philemon avatar Dec 26 '22 01:12 ukane-philemon

I'd say something down at the bottom near the red/green indicator. Maybe orange with next next to it. But, meh

Okay, then how about API consumers?

I'd have to check, but I think the "ready" flag already handles this.

chappjc avatar Dec 26 '22 01:12 chappjc

I think the "ready" flag already handles this.

It should but I don't think it is set when we fail to update connections(which will fail if the node is disconnected).

I'm thinking c.Status should be set to false if we fail at line 167.

https://github.com/decred/dcrdata/blob/master/cmd/dcrdata/internal/api/apiroutes.go#L166-#L200

ukane-philemon avatar Dec 26 '22 01:12 ukane-philemon