-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
book_changes takes a long time querying full-history servers #5036
Comments
This method RPC::getLedgerByContext takes up a lot of time to retrieve an old ledger. This method is used only in RPC calls I do not have appropriate permissions to verify my suspicion -- that On the other hand, RPC::lookupLedger completes its requests quickly. This method is used in RPCs The former method appears to be slower than the latter, because it does not leverage @mDuo13 This also explains your observations in #5033. The logs from |
On that note, a lot of the ledger-retrieval related RPC commands seem very similar -- I've come across What was the rationale for introducing so many of the RPC commands? |
The purpose of the ADMIN method
Yes, it takes long time because it needs to. That's the cost of retrieving ledger from other nodes.
This function
|
@Bronek thanks, that explanation makes a lot of sense. |
Issue Description
When calling the
book_changes
method using WebSocket or JSON-RPC, asking for data from older ledgers leads to a long delay or even a request timeout.Steps to Reproduce
Expected Result
Server should respond quickly with a value like this:
Actual Result
Server takes a long time (>30s) to respond if it responds at all. On xrplcluster.com this results in the gateway returning a 504 error.
For more recent ledgers, the server responds quickly with a valid response, so this has something to do with fetching older data specifically. It's unclear how old a ledger you have to ask for before it becomes a problem.
Environment
Tested on xrplcluster, with servers running (I think)
rippled 2.1.0
and confirmed by Wietse querying FH servers directly.Note that this issue does not seem to happen to Clio servers, so I could not reproduce on s1.ripple.com.
The text was updated successfully, but these errors were encountered: