3

I occasionally get "txn-txn-inflight limit reached [txn=251584, min=240384]" on servers when attempting to read data from (embedded) QuestDb.

It self corrects after some time (minutes). What does it mean and what can I do to avoid it?

Jon
  • 2,043
  • 11
  • 9
  • 1
    This could be caused by resource leak emanating from your code. I would double check that resources such as `RecordCursorFactory`, `RecordCursor` and `TableReader` are closed after use. The large spread between `txn` and `min` could indicate that active `TableReader` instances are present. Unless you're expecting 10k simultaneous queries - I would assume a leak. – Vlad Ilyushchenko Jun 01 '21 at 13:24

1 Answers1

3

Try removing _txn_scoreboard file in table's directory. This file has no meaning unless process is running.

The contents of this file is used to indicate if there is active TableReader holding a view on particular data transaction. When Java process exists, TableReader instances returned to pool will clock down their transaction number to prevent false-positive "reader holding transaction X'.

If Java process is crashed or did not return TableReader to pool, the transaction numbers can appear to be in-use next time application starts. The only work around so far is to remove _txn_scoreboard file.

  • Thank you, removing that file and restarting the process resolves the issue. So, is this a known error? We never saw it until we upgraded from 5 to 6.0.2. – Jon Jun 02 '21 at 11:43
  • 2
    This is a new functionality in 6.0.x. We are fixing this issue for good in 6.0.4 – Vlad Ilyushchenko Jun 03 '21 at 18:54
  • @VladIlyushchenko I use questdb image v6.0.4 but still see this error happen. We use REST API, not Java one though. – hgminh Aug 02 '21 at 08:38