Granola-Team / mina-block-explorer

Web application for the Mina blockchain
Apache License 2.0
7 stars 6 forks source link

Problem: outstanding API calls accumulated seemingly without bound #933

Open jhult opened 2 months ago

jhult commented 2 months ago
image
n1tranquilla commented 2 months ago

Is this a workaround for something broken?

n1tranquilla commented 2 months ago

The issue title describes a solution. An alternative title might say "Repeated API calls return 500" or some other symptom. I can't tell the error code from the screenshot, but if we update the title to include the symptom, we might better be able to address the root problem. Perhaps the API call is broken and we can simply fix it.

robinbb commented 2 months ago

I will correct the title.

robinbb commented 2 months ago

API calls occur regularly without regard for whether the prior API call has returned. No timeout handling occurs. Even if a prior API call were to return, results would then be pending on a subsequent API call which has not yet returned. Server becomes loaded with API calls that are not even used.

n1tranquilla commented 2 months ago

I see. I tried reproducing this the other day and couldn't. Could you add some details on what page/where the problem manifest? The code for polling is located in multiple places and I'm not sure the solution is trivial enough to fix them all.

n1tranquilla commented 2 months ago

Ok a closer look at the image provided shows that some calls are taking several minutes. Thanks for the elaboration.

n1tranquilla commented 2 months ago

I'm not sure what the solution is for this issue. It seems like we need a workaround until API endpoints are more performant. Should we disable polling until this is not an issue?

robinbb commented 2 months ago

Just check to make sure that the prior call has returned before invoking another.

n1tranquilla commented 1 week ago

I don't think this is an pressing issue right. It is going to the bottom of the backlog.