Out of memory after update to 1.2.4
After update nodeos from 1.2.1 to 1.2.4, can not startup:
./nodeos
2018-09-10T10:47:55.448 thread-0 chain_plugin.cpp:317 plugin_initialize ] initializing chain plugin
Killed
tail -f /var/log/kern.log
Sep 10 18:48:16 localhost kernel: [ 475.353998] Out of memory: Kill process 2071 (nodeos) score 950 or sacrifice child
Sep 10 18:48:16 localhost kernel: [ 475.356197] Killed process 2071 (nodeos) total-vm:42016936kB, anon-rss:2628kB, file-rss:15935356kB
server RAM:16GB, only use chain plugin and net plugin. So much RAM need?...
Can you please list the contents of
ulimit -a
(from the console you run nodeos from)
And also please share your config.ini
@gs201510 Are you using Ubuntu?
@spartucus Yes, using ubuntu 16.04
@spoonincode
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 63526
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 102400
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 63526
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
config.ini
bnet-endpoint = 0.0.0.0:4321
bnet-follow-irreversible = 0
bnet-no-trx = false
bnet-peer-log-format = ["${_name}" ${_ip}:${_port}]
blocks-dir = "blocks"
abi-serializer-max-time-ms = 15000
chain-state-db-size-mb = 30720
chain-state-db-guard-size-mb = 128
reversible-blocks-db-size-mb = 1024
reversible-blocks-db-guard-size-mb = 16
contracts-console = false
read-mode = speculative
validation-mode = full
https-client-validate-peers = 1
http-server-address = 0.0.0.0:8888
access-control-allow-origin = *
access-control-allow-credentials = false
max-body-size = 1048576
verbose-http-errors = false
http-validate-host = false
max-login-requests = 1000000
max-login-timeout = 60
mongodb-queue-size = 1024
mongodb-abi-cache-size = 2048
mongodb-wipe = false
mongodb-block-start = 0
mongodb-store-blocks = 1
mongodb-store-block-states = 1
mongodb-store-transactions = 1
mongodb-store-transaction-traces = 1
mongodb-store-action-traces = 1
p2p-listen-endpoint = 0.0.0.0:9876
p2p-peer-address = jungle.cryptolions.io:19876
p2p-peer-address = dev.cryptolions.io:39876
p2p-peer-address = dev03.cryptolions.io:9878
p2p-peer-address = jungle.eosbcn.com:2095
p2p-peer-address = jungle.cryptolions.io:19876
p2p-peer-address = dev.cryptolions.io:19876
p2p-peer-address = 52.199.125.75:9876
p2p-peer-address = testnet.blockgenesys.com:29876
p2p-peer-address = 167.99.91.77:9876
p2p-peer-address = 149.202.165.174:19876
p2p-peer-address = peer.jungle.alohaeos.com:9876
p2p-peer-address = 41.161.77.154:9876
p2p-peer-address = dev03.cryptolions.io:9878
p2p-peer-address = dev03.cryptolions.io:9878
p2p-peer-address = jungle.cryptolions.io:19876
p2p-peer-address = jungle.cryptolions.io:39876
p2p-peer-address = jungle.cryptolions.io:39876
p2p-max-nodes-per-host = 8
agent-name = "EOS Test Agent"
allowed-connection = any
max-clients = 25
connection-cleanup-period = 30
max-cleanup-time-msec = 10
network-version-match = 0
sync-fetch-span = 100
max-implicit-request = 1500
use-socket-read-watermark = 0
peer-log-format = ["${_name}" ${_ip}:${_port}]
enable-stale-production = false
pause-on-startup = false
max-transaction-time = 30
max-irreversible-block-age = -1
signature-provider = ...
keosd-provider-timeout = 5
produce-time-offset-us = 0
last-block-time-offset-us = 0
incoming-defer-ratio = 1
txn-reference-block-lag = 0
plugin = eosio::chain_api_plugin
plugin = eosio::chain_plugin
plugin = eosio::net_plugin
plugin = eosio::net_api_plugin
Well, then i think it's duplication of https://github.com/EOSIO/eos/issues/5554
The new version will use "mlock" to lock all memory of size defined in chain-state-db-size-mb for better performance and latency. In your config chain-state-db-size-mb = 30720 is clearly run out of your physical RAM limit. I suggest to sync with a machine of equal or more than 32GB RAM.
@gs201510 @taokayan You can set chain-state-db-size-mb = 10240 since your physical RAM is 16GB. And then you will find that it frozen at startup just like what I did. There are somethings wrong with ubuntu.
@taokayan @spartucus Even through I set chain-state-db-size-mb = 5120, got the same error..
I set chain-state-db-size-mb = 10240, got the same error. After update 1.2.2 and 1.2.4, the nodeos was killed frequently, and the nodeos show: "what":"database dirty flag set".
max locked memory (kbytes, -l) 64
This should have prevented mlock from occurring 🤔