eos icon indicating copy to clipboard operation
eos copied to clipboard

Out of memory after update to 1.2.4

Open gs201510 opened this issue 8 years ago • 10 comments

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?...

gs201510 avatar Sep 10 '18 10:09 gs201510

Can you please list the contents of ulimit -a (from the console you run nodeos from)

And also please share your config.ini

spoonincode avatar Sep 10 '18 13:09 spoonincode

@gs201510 Are you using Ubuntu?

spartucus avatar Sep 11 '18 01:09 spartucus

@spartucus Yes, using ubuntu 16.04

gs201510 avatar Sep 11 '18 02:09 gs201510

@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

gs201510 avatar Sep 11 '18 03:09 gs201510

Well, then i think it's duplication of https://github.com/EOSIO/eos/issues/5554

spartucus avatar Sep 11 '18 03:09 spartucus

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.

taokayan avatar Sep 11 '18 07:09 taokayan

@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.

spartucus avatar Sep 11 '18 07:09 spartucus

@taokayan @spartucus Even through I set chain-state-db-size-mb = 5120, got the same error..

gs201510 avatar Sep 11 '18 09:09 gs201510

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".

stev1988 avatar Sep 11 '18 13:09 stev1988

max locked memory (kbytes, -l) 64 This should have prevented mlock from occurring 🤔

spoonincode avatar Sep 11 '18 15:09 spoonincode