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

Database corrupted after restart #212

Open
kwunyeung opened this issue Jul 8, 2020 · 6 comments
Open

Database corrupted after restart #212

kwunyeung opened this issue Jul 8, 2020 · 6 comments

Comments

@kwunyeung
Copy link

kwunyeung commented Jul 8, 2020

Version

v0.3.1

Process to replicate the issue

  1. stop the node
  2. edit the configuration file
  3. replace a new wallet file
  4. start the node

Stack trace

Jul 08 08:20:08 v-systems vsys[53777]: INFO  vsys.Application$ - Starting...
Jul 08 08:20:09 v-systems vsys[53777]: INFO  kamon.Kamon$Instance - Initializing Kamon...
Jul 08 08:20:10 v-systems vsys[53777]: INFO  a.event.slf4j.Slf4jLogger - Slf4jLogger started
Jul 08 08:20:10 v-systems vsys[53777]: INFO  vsys.Application$ - VSYS Core v0.3.1 Blockchain Id: M
Jul 08 08:20:10 v-systems vsys[53777]: DEBUG vsys.db.package$ - Open DB at /var/lib/vsys/.vsys/data
Jul 08 08:20:29 v-systems systemd[1]: vsys.service: Main process exited, code=killed, status=9/KILL
Jul 08 08:20:29 v-systems systemd[1]: vsys.service: Failed with result 'signal'.

Other information

It works fine if I remove the /data directory and resync again.

@faddat
Copy link
Contributor

faddat commented Jul 9, 2020

Were you using the .jar file, or the .Deb?

What OS?

What Java version?

Also, what prompted the restart? Is it like a local node on your laptop? I have experienced this when running vsys on my MacBook.

Thanks!

@kwunyeung
Copy link
Author

I figured that out is actually due to not enough memory. As the chain data getting larger, it will use more memory to start the node. Can the memory usage on starting the node can be reduced? Otherwise, it will not be sustainable in a long run.

@faddat
Copy link
Contributor

faddat commented Jul 10, 2020

How much RAM is on your node?

I haven't had this issue but my nodes tend to be quite large (128gb or 64gb) so I'm curious where the limitation is.

Thanks.

@ncying
Copy link
Member

ncying commented Jul 12, 2020

@kwunyeung you can change the
blockchain {
minimum-in-memory-diff-blocks = 3600 => minimum-in-memory-diff-blocks = 1000 or less
}
in .conf file, if you really need to run the node in a machine with less memory.

@kwunyeung
Copy link
Author

@faddat I was trying to sync a backup node with less resources. Tried to start with a 4GB box. It's not easy to always get a 64GB machines 😅 .

@90hacker
Copy link

I also had the same problem.
8g RAM。minimum-in-memory-diff-blocks I set it to 100 but it can't start。
VSYS Core v0.3.2。

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

No branches or pull requests

4 participants