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

Txn is too big to fit into one request: unable to bootstrap balances #245

Closed
samuel-rufi opened this issue Sep 22, 2021 · 7 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@samuel-rufi
Copy link

Describe the bug

When trying to bootstrap a large bootstrap_balances.json file that contains more than 35k accounts, rosetta-cli breaks with following error: "Txn is too big to fit into one request: unable to bootstrap balances".

To Reproduce
Steps to reproduce the behavior:

  1. create a large bootstrap_balances.json file that contains for example more than 35k accounts
  2. link the bootstrap_balances.json file with the rosetta-cli configuration file
  3. run the rosetta-cli data check

Expected behavior
I expect rosetta-cli to be able to handle large bootstrap_balances.json files that contain many accounts.

@samuel-rufi samuel-rufi added the bug Something isn't working label Sep 22, 2021
@shrimalmadhur
Copy link
Contributor

Thanks @rufsam for bringing this up. I will take a look at it and get back to you.

@shrimalmadhur shrimalmadhur self-assigned this Sep 22, 2021
@maili-cb
Copy link

maili-cb commented Oct 6, 2021

@shrimalmadhur I am thinking this limitation may come from here , the default table size is set to 256MB, which means the default max txn size for badgerDB is ~38MB. Whereas the PerformanceMaxTableSize is 3072MB which is more performance geared.

@shrimalmadhur
Copy link
Contributor

@maili-cb I see. I am wondering if we can break these transactions and then bootstrap balances. Maybe explore more on how we could handle this without changing these settings.

@samuel-rufi
Copy link
Author

Hi @maili-cb and @shrimalmadhur! do you have any new findings on this issue? Thanks alot for your efforts.

@shrimalmadhur
Copy link
Contributor

Hi @rufsam

Sorry for the delayed response. I did a little more digging on this and here's what I found. This issue comes from Badger DB configuration settings as mentioned by @maili-cb . So the error comes from the BadgerDB config. Using MaxTableSize config we are limiting the size of memtable.

A way to solve this is using more memory performant settings provided by rosetta-cli config. You can do this by enabling MemoryLimitDisabled config. This will enable the Performance Badger option which would increase the size of memtable significantly and should be able to handle larger transaction size. Please be mindful that this will need a lot more RAM so make sure to have enough free RAM while doing this. Let me know if that doesn't work and we can try to figure out other options.

@samuel-rufi
Copy link
Author

samuel-rufi commented Oct 28, 2021

Hello @shrimalmadhur, thanks for your help and detailed information. It seems like that the "memory_limit_disabled" = true did solve the issue.

Assuming that there will be many more accounts to be bootstrapped in the future, the high RAM requirement could be an obstacle for integrators. If possible, it would definitely be good to explore other options to solve the problem.

@shrimalmadhur
Copy link
Contributor

@rufsam great to hear it worked. And yes it makes sense to solve this issue in generic way rather than increasing system's RAM. I will create a separate issue for exploring other options.

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

No branches or pull requests

3 participants