Skip to content
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

Indexer Lag in Dev Mode #1613

Open
gmalouf opened this issue May 15, 2024 · 1 comment
Open

Indexer Lag in Dev Mode #1613

gmalouf opened this issue May 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gmalouf
Copy link
Contributor

gmalouf commented May 15, 2024

"The behaviour I'm seeing is that intermittently, but consistently (multiple times every test run) indexer will wait for about 17s (almost exactly) until the transaction that's being waited for appears. The rest of the time it will happily appear sub-second. This makes me think there some sort of deadlock or delay somewhere."

Quoting @robdmoore:

I've recently found that there is an intermittent, but consistently occurring and significant performance issue with indexer when running the automated tests for https://github.com/algorandfoundation/algokit-subscriber-ts.

There are some tests in that library that use the following function in a series of tests (e.g. filters.spec.ts and events.spec.ts): https://github.com/algorandfoundation/algokit-subscriber-ts/blob/main/tests/filterFixture.ts#L29. Namely the call to waitForIndexerTransaction.

This method is defined in algokit-utils here: https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/fixtures/algorand-fixture.ts#L122 and consists of these two underlying methods: https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/testing/indexer.ts#L12 and https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/indexer-lookup.ts#L20.

The behaviour I'm seeing is that intermittently, but consistently (multiple times every test run) indexer will wait for about 17s (almost exactly) until the transaction that's being waited for appears. The rest of the time it will happily appear sub-second. This makes me think there some sort of deadlock or delay somewhere.

I've looked at logs in algod, conduit, indexer and postgres and attached a profiler of sorts of postgres, but haven't seen anything conclusive yet.

Two things I have found:

Originally posted by @robdmoore in #1457

@robdmoore
Copy link

Thanks Gary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants