dcgtc / dgrants

Decentralized Grant platform that implements quadratic funding.
GNU Affero General Public License v3.0
84 stars 39 forks source link

Sporadic Very Slow Responses From The Graph #538

Closed apbendi closed 2 years ago

apbendi commented 2 years ago

In repeatedly testing #534, I occasionally saw extremely long load times, i.e. the loading spinner persisted on the page for 5-10 seconds or more. Anecdotally, I seemed to see this perhaps every 3-6 times I cleared local store and did a hard refresh of the page.

Digging into this a bit more, it seems to be caused by sporadic hanging requests to The Graph, as demonstrated below:

long-graph-response

A few thoughts on this:

  1. Is there anything we're doing that might be causing this? For example, is this a weird edge case query of some kind— querying for empty data or for a block number that The Graph hasn't loaded or something like this (totally spitballing, just wondering if anything about the nature of our request could be causing it).
  2. Do we have a contact with The Graph we can reach out to about this— perhaps there is something about our graph configuration that might be causing it, or a paid tier we can upgrade to that would reduce the likelihood of this issue, etc...
  3. Is there anything we can do to mitigate the impact of this for users, if there's no way to prevent it from happening sporadically in production. Perhaps, for example, timeout our request client side after 5000 ms and retry, or something along these lines?
apbendi commented 2 years ago

Here are some screenshots I took about the request in question, in case they are helpful:

Screen Shot 2021-11-29 at 12 08 17 PM Screen Shot 2021-11-29 at 12 07 59 PM Screen Shot 2021-11-29 at 12 04 50 PM
apbendi commented 2 years ago

screenshots form another very slow run:

Screen Shot 2021-11-29 at 1 22 02 PM Screen Shot 2021-11-29 at 1 21 57 PM Screen Shot 2021-11-29 at 1 21 51 PM Screen Shot 2021-11-29 at 1 21 46 PM Screen Shot 2021-11-29 at 1 21 15 PM
azf20 commented 2 years ago

Hey @apbendi are you still seeing this slow loading? There were some changes on the Hosted Service proxy that fixed some connection issues. If you are still having issues, happy to dig in here

phutchins commented 2 years ago

Thanks for the response @azf20! We will keep an eye out to see if the changes have resolved our issues.

apbendi commented 2 years ago

Thanks @azf20, this appears to be resolved. I've not seen it in testing or in day-to-day usage of the app, now in prod for several days.