XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.5k stars 1.46k forks source link

Rippled continuously restarts #2554

Closed svenvdz closed 5 years ago

svenvdz commented 6 years ago

Hi,

I recently installed a Rippled server on my Centos 7 VPS and I noticed that Rippled continuously restarts on its own. It works fine though, but I'm wondering why it restarts.

My server specs are: 2 CPU 4gb RAM + 4gb Swap 60GB ssd Centos 7 x64

This is my rippled.cfg:

port_rpc_admin_local
port_peer
port_ws_admin_local
#port_ws_public
#ssl_key = /etc/ssl/private/server.key
#ssl_cert = /etc/ssl/certs/server.crt

[port_rpc_admin_local]
port = 5005
ip = 127.0.0.1
admin = 127.0.0.1
protocol = http

[port_peer]
port = 51235
ip = 0.0.0.0
protocol = peer

[port_ws_admin_local]
port = 6006
ip = 127.0.0.1
admin = 127.0.0.1
protocol = ws

#[port_ws_public]
#port = 5005
#ip = 127.0.0.1
#protocol = wss

#-------------------------------------------------------------------------------

[node_size]
small

# This is primary persistent datastore for rippled.  This includes transaction
# metadata, account states, and ledger headers.  Helpful information can be
# found here: https://ripple.com/wiki/NodeBackEnd
# delete old ledgers while maintaining at least 2000. Do not require an
# external administrative command to initiate deletion.
[node_db]
type=NuDB
path=/var/lib/rippled/nudb
open_files=1000
filter_bits=12
cache_mb=256
file_size_mb=8
file_size_mult=2
online_delete=256
advisory_delete=0

[ledger_history]
128

# This is the persistent datastore for shards. It is important for the health
# of the ripple network that rippled operators shard as much as practical.
# NuDB requires SSD storage. Helpful information can be found here
# https://ripple.com/build/history-sharding
#[shard_db]
#type=NuDB
#path=/var/lib/rippled/db/shards/nudb
#max_size_gb=500

[database_path]
/var/lib/rippled/nudb

# This needs to be an absolute directory reference, not a relative one.
# Modify this value as required.
[debug_logfile]
/var/log/rippled/debug.log

[sntp_servers]
time.windows.com
time.apple.com
time.nist.gov
pool.ntp.org

# Where to find some other servers speaking the Ripple protocol.
[ips]
r.ripple.com 51235

# To use the XRP test network (see https://ripple.com/build/xrp-test-net/),
# use the following [ips] section instead:
# [ips]
# r.altnet.rippletest.net 51235

# File containing trusted validator keys or validator list publishers.
# Unless an absolute path is specified, it will be considered relative to the
# folder in which the rippled.cfg file is located.
[validators_file]
validators.txt

# Turn down default logging to save disk space in the long run.
# Valid values here are trace, debug, info, warning, error, and fatal
[rpc_startup]
{ "command": "log_level", "severity": "warning" }

# If ssl_verify is 1, certificates will be validated.
# To allow the use of self-signed certificates for development or internal use,
# set to ssl_verify to 0.
[ssl_verify]
0
svenvdz commented 6 years ago

Btw here is my server_info:

{
   "result" : {
      "info" : {
         "build_version" : "1.0.0",
         "complete_ledgers" : "38839955-38840238",
         "hostid" : "webserver",
         "io_latency_ms" : 1,
         "jq_trans_overflow" : "0",
         "last_close" : {
            "converge_time_s" : 3,
            "proposers" : 16
         },
         "load" : {
            "job_types" : [
               {
                  "avg_time" : 2,
                  "job_type" : "ledgerRequest",
                  "peak_time" : 43,
                  "per_second" : 1,
                  "waiting" : 1
               },
               {
                  "job_type" : "untrustedProposal",
                  "peak_time" : 6,
                  "per_second" : 37
               },
               {
                  "avg_time" : 13,
                  "in_progress" : 1,
                  "job_type" : "ledgerData",
                  "peak_time" : 96,
                  "per_second" : 1
               },
               {
                  "in_progress" : 1,
                  "job_type" : "clientCommand",
                  "peak_time" : 7,
                  "per_second" : 4,
                  "waiting" : 1
               },
               {
                  "avg_time" : 1,
                  "job_type" : "transaction",
                  "peak_time" : 14,
                  "per_second" : 8
               },
               {
                  "job_type" : "batch",
                  "peak_time" : 23,
                  "per_second" : 7
               },
               {
                  "avg_time" : 8,
                  "in_progress" : 1,
                  "job_type" : "advanceLedger",
                  "peak_time" : 108,
                  "per_second" : 2
               },
               {
                  "avg_time" : 7,
                  "job_type" : "fetchTxnData",
                  "peak_time" : 37,
                  "per_second" : 3
               },
               {
                  "avg_time" : 1,
                  "job_type" : "trustedValidation",
                  "peak_time" : 11,
                  "per_second" : 3
               },
               {
                  "job_type" : "writeObjects",
                  "peak_time" : 12,
                  "per_second" : 2
               },
               {
                  "in_progress" : 1,
                  "job_type" : "acceptLedger"
               },
               {
                  "job_type" : "trustedProposal",
                  "peak_time" : 6,
                  "per_second" : 5
               },
               {
                  "avg_time" : 8,
                  "job_type" : "heartbeat",
                  "peak_time" : 22
               },
               {
                  "job_type" : "peerCommand",
                  "per_second" : 837
               },
               {
                  "job_type" : "diskAccess",
                  "peak_time" : 11,
                  "per_second" : 2
               },
               {
                  "job_type" : "processTransaction",
                  "per_second" : 8
               },
               {
                  "job_type" : "SyncReadNode",
                  "peak_time" : 11,
                  "per_second" : 2301
               },
               {
                  "job_type" : "AsyncReadNode",
                  "peak_time" : 13,
                  "per_second" : 176
               },
               {
                  "job_type" : "WriteNode",
                  "peak_time" : 8,
                  "per_second" : 1454
               }
            ],
            "threads" : 4
         },
         "load_factor" : 528.16015625,
         "load_factor_fee_escalation" : 528.16015625,
         "load_factor_server" : 1,
         "peer_disconnects" : "109",
         "peer_disconnects_resources" : "0",
         "peers" : 19,
         "pubkey_node" : "n9KpStytrbR7X7kBktEaC1zMek62S64oTc8bqCmXDuyHakmmAVk6",
         "pubkey_validator" : "none",
         "server_state" : "full",
         "state_accounting" : {
            "connected" : {
               "duration_us" : "308631443",
               "transitions" : 1
            },
            "disconnected" : {
               "duration_us" : "1316645",
               "transitions" : 1
            },
            "full" : {
               "duration_us" : "1061402760",
               "transitions" : 1
            },
            "syncing" : {
               "duration_us" : "2172985",
               "transitions" : 1
            },
            "tracking" : {
               "duration_us" : "1",
               "transitions" : 1
            }
         },
         "time" : "2018-May-22 12:44:45.070840",
         "uptime" : 1374,
         "validated_ledger" : {
            "age" : 5,
            "base_fee_xrp" : 1e-05,
            "hash" : "FCF0ED55BF94EBE3E1AAF029BA7F03FD4878167570AD1ABBBA6043C57F776ABA",
            "reserve_base_xrp" : 20,
            "reserve_inc_xrp" : 5,
            "seq" : 38840238
         },
         "validation_quorum" : 11,
         "validator_list_expires" : "2018-Jun-04 00:00:00.000000000"
      },
      "status" : "success"
   }
}
svenvdz commented 6 years ago

And it does give a lot of LoadMonitor warnings LoadMonitor:WRN Job: recvPropose->checkPropose run: 0ms wait: 1527ms

miguelportilla commented 6 years ago

Hi svendvdz,

I don't know what the cause is but given your hardware specs, I recommend trying the following changes.

Your machine has the minimum amount of RAM required, you may want to try using 'tiny' as the node_size.

[node_size]
tiny

The following settings apply only to RocksDB and since you are using NuDB they can either be commented out or removed.

open_files=1000
filter_bits=12
cache_mb=256
file_size_mb=8
file_size_mult=2

Here I recommend using a minimum value of 256.

[ledger_history]
128

Does your debug.log file contain any errors that may help diagnose your the problem further? How about the CentOS logs?