-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: optimize the round trips when reconciling the subgraph deployments #1058
Conversation
… subgraphs on the network
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find. I have another PR in that was intended to fix a test in that same function (#1056), I bumped the page size there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
closing in favor of #1056, thanks! |
This PR is fixing a different function than #1056, this one is for |
Also tagging @fordN for visibility |
My bad, I mixed up a similar fix. |
Issue
I was running the Indexer Agent and after a few days I realized the amount of queries it sent to the network subgraphs was out of proportion and quickly draining my api key.
Investigation
The Indexer Agent performs a number of “housekeeping” queries at regular periods of time to sync with the latest network status.
One of those queries gets the entire set of subgraphs on the network but it does so paginating by 10 items batches. With the current number of subgraphs over 10,000, it takes more than 1,000 queries to get them all.
The eventual runs every 120 seconds, that means it's sending about 720,000 queries a day.
Resolution
Set the
first
parameter to1000
for the query withinsubgraphDeployments
function of theNetworkMonitor.