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 triggers DB error "FATAL: sorry, too many clients already" when doing too many sequential queries (no parallel queries) #553

Closed
fabrice102 opened this issue Jun 28, 2021 · 3 comments

Comments

@fabrice102
Copy link
Contributor

Summary

Querying accounts with a previous round even sequentially make the DB display the following error:

FATAL:  sorry, too many clients already

and then a long list of

LOG:  unexpected EOF on client connection with an open transaction

The indexer returns the message:

{"message":"Indexer health error: %s"}

(error 500)
and sometimes completely crashes.

To try, run:

for i in $(seq 200)
do
  curl "$AF_IDX_ADDRESS/v2/accounts/GFIDQ2XIX2CMPJZ4DS3ISIOPOCJQDGRB5JQGCVHG63CACQF3OXXRBLOIDM?round=15049487"
done

against an indexer $AF_IDX_ADDRESS for TestNet.
(You may want to change the round to the current round.)

Note that this code does not make any parallel queries to the indexer, it waits for the previous query to end before making a new query. So this should almost create no load on the indexer and on the DB.

TestNet indexer does not seem to crash. MainNet indexer does.

Setup

  • algorand-indexer version:
    $ algorand-indexer -v
    2.5.0 compiled at 2021-06-22T18:26:33+0000 from git hash 1f3fb466681dc0f025be504576e4632b83130e27 (modified)
  • OS: macOS BigSur 11.4

Version 2.3.4 of indexer did not have this issue.

Urgency/Relative Priority

Relatively urgent: Allows crashes of the indexer with very low load

@fabrice102 fabrice102 changed the title Indexer triggers DB error "" when doing too many sequential queries (no parallel queries) Indexer triggers DB error "FATAL: sorry, too many clients already" when doing too many sequential queries (no parallel queries) Jun 28, 2021
@winder
Copy link
Contributor

winder commented Jun 28, 2021

Duplicate of #517

@winder winder marked this as a duplicate of #517 Jun 28, 2021
@fabrice102
Copy link
Contributor Author

Two guesses (not tested/verified):

@tolikzinovyev
Copy link
Contributor

@fabrice102, thanks for the suggestions! Please check if #554 fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants