EOS 节点自动关闭错误

参考

https://github.com/EOSIO/eos/issues/5107

正文

最近弄了一台服务器来同步eos 主网的数据, 但是在同步过程中老是会莫名其妙的停掉, 通过查日志发现了一些端倪.

我启动节点是用的nohup 启动的, 所以我查看了最近200调日志

tail -n 200 nohup.out

发现了这样一句话:

Database has reached an unsafe level of usage, 
shutting down to avoid corrupting the database.

Please increase the value set for "chain-state-db-size-mb" and restart the process!
Details: 3060101 database_guard_exception: Database usage is at unsafe levels
database free: 134215280, guard size: 134217728
    {"f":134215280,"g":134217728}
    thread-0  controller.cpp:1627 validate_db_available_size

shutdown..

很明确, 原来是EOS 程序 因为数据库尺寸达到了危险指标, 所以自己退出了.
然而我的机器有6TB 磁盘空间, mongodb随便它用….

从日志中可以看出需要将 chain-state-db-size-mb 设置大一点才行, 不过这个值要设置多大才合适呢?
我不知道, 我直接多加了个0就是了…

以下是我修改部分的配置

# Maximum size (in MiB) of the chain state database (eosio::chain_plugin)
chain-state-db-size-mb = 10240

# Safely shut down node when free space remaining in the chain state database drops below this size (in MiB). (eosio::chain_plugin)
chain-state-db-guard-size-mb = 100

# Maximum size (in MiB) of the reversible blocks database (eosio::chain_plugin)
reversible-blocks-db-size-mb = 10240

# Safely shut down node when free space remaining in the reverseible blocks database drops below this size (in MiB). (eosio::chain_plugin)
reversible-blocks-db-guard-size-mb = 20

中文版:

# 用于存储链状态的数据库尺寸,以兆为单位
chain-state-db-size-mb = 10240

# 用于存储链状态的数据库尺寸低于多少兆时安全的退出节点
chain-state-db-guard-size-mb = 100

# 用于存储不可逆的区块数据 的 数据库尺寸,以兆为单位
reversible-blocks-db-size-mb = 10240

# 用于存储不可逆区块的数据库尺寸低于多少兆时安全的退出节点
reversible-blocks-db-guard-size-mb = 100
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值