graphprotocol / mission-control-indexer

Technical indexer documentation and infrastructure templates for the Mission Control testnet
21 stars 4 forks source link

Sitting idle on the Profile page crashes the webpage for a few seconds #127

Closed trader-payne closed 3 years ago

trader-payne commented 3 years ago

Title self explanatory, but doesn't happen 10/10.

I've noticed that it happens more often if the user switches between explorer main page and profile, but I don't know if that should be classified as retarded user behavior or not. 😅

Might also be because of the general query traffic/load, because sometimes I can't repro this at all. But when I do manage to repro it, it all starts with the profile page loading very slowly (takes a few secs), everything loads up, then after like 5-10 seconds it crashes with the error below for a few seconds, then back up again.

image

nenadjaja commented 3 years ago

Yeah that's the issue with our hosted service, the same with this one https://github.com/graphprotocol/mission-control-indexer/issues/111. On the front-end I can catch these type of errors, and show something nicer than that error message. Any ideas what could we show there @trader-payne ? Maybe some messaging like "Something went wrong, hang in there. Try refreshing in a couple of seconds..." What would be the most helpful?

trader-payne commented 3 years ago

The ones mentioned in the other issue are not related to this one, I think, because the query nodes were not overloaded when the errors occurred.

I saw that the one I referred to in this issue only happens when there's high load on the query nodes, for example yesterday was constantly popping up during the time when the infrastructure was overloaded.

It would be great if you could add a message there like you said. It would make the things look much cleaner overall when stuff goes wrong.

Amazon has a nice one, something in the lines of: "Uh-oh, something went wrong on our side. Try refreshing the page in a few moments." 😆

nenadjaja commented 3 years ago

Yeah. They relate in the sense that they are all "hosted service" issue (query nodes are part of the hosted service). In this case it was a diff issue with query nodes or something else, I can't remember. But could be also too many requests that I am making that cause it to get into a weird state (profile page has more requests than browsing). I'll look into things on my end

trader-payne commented 3 years ago

That's why I said I don't know if it counts as retarded user behavior or not 😆. Maybe you can add a rate limit locally to stop someone from spamming with too many requests. I don't know if that's possible, I'm just thinking out loud.

But thanks for the insight, it does make sense why those errors pop up. 🙌

trader-payne commented 3 years ago

Related to #111. Closing this one as the other one is tracked.