-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[bug]: listinvoices
hangs with a large sqlite DB
#9716
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
Comments
Testing with a much smaller query, you can see things are really slow:
|
are you testing this with native invoices active ? |
Sorry, yes, forgot to include that I am running with |
Note that normal use case for listing invoices is to use pagination. |
Right, but still very slow even when I limit. Also, in #9709 I suggest that we have a default for |
I re-tested the above with postgres with what should be the same DB (it was created from the same original bbolt DB) and I'm getting a lot better performance:
I then try to run the original command that I was struggling with and I get
. I also compare to the listpayments query and I get:
which leads me to believe that postgres is much slower than SQLite for KV schema but much faster for SQL schema (payments are currently still using the old KV schema whereas invoices have been converted to use the SQL schema). Here's some info about my postgres DB size:
This is interesting because in lightninglabs/lndinit#21 (comment) I reported that the postgres DB size was 20G, so the conversion from KV to SQL schema (which was done for this test) must use more disk space. |
This is also demonstrated here too: #9729 (comment) |
I have a large sqlite DB:
Here's my LND version:
I try to run
time lncli listinvoices --max_invoices=300000 > /dev/null
and it uses about 100% CPU but it uses minimal disk activity and RAM. I've let it run over over an hour and I get nothing back.On the contrary,
listpayments
is much faster for the same query limit, responding in under 3 minutes:Contrary to what is reported in #9709 for
listpaymets
, Control+C does stop the CPU usage on the node forlistinvoices
.I have not tested this issue yet with postges.
The text was updated successfully, but these errors were encountered: