mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-24 13:45:49 +00:00
Fix history sharding, update links
This commit is contained in:
@@ -117,7 +117,7 @@ In addition to RippleAPI-specific code, this script uses syntax and conventions
|
||||
const RippleAPI = require('ripple-lib').RippleAPI;
|
||||
```
|
||||
|
||||
The opening line enables [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). This is purely optional, but it helps you avoid some common pitfalls of JavaScript. See also: [Restrictions on Code in Strict Mode](https://msdn.microsoft.com/library/br230269%28v=vs.94%29.aspx#Anchor_1).
|
||||
The opening line enables [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). This is purely optional, but it helps you avoid some common pitfalls of JavaScript.
|
||||
|
||||
The second line imports RippleAPI into the current scope using Node.js's require function. RippleAPI is one of [the modules `ripple-lib` exports](https://github.com/ripple/ripple-lib/blob/develop/src/index.ts).
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ max_size_gb=50
|
||||
|
||||
**Tip:** Ripple recommends using NuDB for the shard store (`type=NuDB`). NuDB uses fewer file handles per shard than RocksDB. RocksDB uses memory that scales with the size of data it stores, which may require excessive memory overhead. However, NuDB is designed to be used with SSD drives and does not work with rotational disks.
|
||||
|
||||
**Caution:** If you enable history sharding, then later change the database type of your shard store, you must also change the path or delete the existing data from the configured path. If `rippled` detects the wrong type of data in the shard store path, it may fail to start.
|
||||
|
||||
For more information, reference the `[shard_db]` example in the [rippled.cfg configuration example](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg).
|
||||
|
||||
## 3. Restart the server
|
||||
@@ -43,4 +45,10 @@ For more information, reference the `[shard_db]` example in the [rippled.cfg con
|
||||
systemctl restart rippled
|
||||
```
|
||||
|
||||
***TODO: is there an API method you can use to check that the server started and sharding was successfully enabled?***
|
||||
## 4. Wait for shards to download
|
||||
|
||||
After your server syncs to the network, it automatically starts downloading history shards to fill the available space in the shard store. You can see which shards are being downloaded by looking at which folders are created in the folder where you configured your shard store. (This is defined by the `path` field of the `[shard_db]` stanza in the `rippled.cfg` file.)
|
||||
|
||||
This folder should contain a numbered folder for each shard your server has. At any given time, up to one folder may contain a `control.txt` file, indicating it is incomplete.
|
||||
|
||||
<!-- TODO: add download_shard and crawl_shards commands when they get added. -->
|
||||
|
||||
@@ -157,6 +157,6 @@ For information about `rippled` log messages, see [Understanding Log Messages](u
|
||||
|
||||
## See Also
|
||||
|
||||
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary on Ubuntu for production use)
|
||||
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu for production use)
|
||||
- [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu)
|
||||
- [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds)
|
||||
|
||||
@@ -35,7 +35,7 @@ Before you install `rippled`, you must meet the [System Requirements](system-req
|
||||
|
||||
## See Also
|
||||
|
||||
- [Automatically Update rippled on Ubuntu Linux]()
|
||||
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary on Ubuntu)
|
||||
- [Update Automatically on CentOS/Red Hat](update-rippled-automatically-on-centos-rhel.html)
|
||||
- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu)
|
||||
- [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu)
|
||||
- [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds)
|
||||
|
||||
@@ -166,4 +166,19 @@ An error such as the following indicates that the `rippled.cfg` has an incomplet
|
||||
Terminating thread rippled: main: unhandled St13runtime_error 'shard path missing'
|
||||
```
|
||||
|
||||
If your config includes a `[shard_db]` stanza, it must contain a `path` field, which points to a directory where `rippled` can write the data for the shard store. This error means the `path` field is missing or located in the wrong place. Check for extra whitespace or typos in your config file, and compare against the [Shard Configuration Example](history-sharding.html#shard-configuration-example).
|
||||
If your config includes a `[shard_db]` stanza, it must contain a `path` field, which points to a directory where `rippled` can write the data for the shard store. This error means the `path` field is missing or located in the wrong place. Check for extra whitespace or typos in your config file, and compare against the [Shard Configuration Example](configure-history-sharding.html#2-edit-rippledcfg).
|
||||
|
||||
|
||||
## ShardStore unable to open/create RocksDB
|
||||
|
||||
If you enable [history sharding](history-sharding.html), then later change the configuration to use RocksDB instead of NuDB, the server may try to read the existing NuDB data as RocksDB data and fail to start. In this case, the server writes an error such as the following:
|
||||
|
||||
```text
|
||||
ShardStore:ERR shard 504 error: Unable to open/create RocksDB: Invalid argument: /var/lib/rippled/db/shards/504: does not exist (create_if_missing is false)
|
||||
```
|
||||
|
||||
To fix this problem, do one of the following:
|
||||
|
||||
- Move or delete the existing shard data from the configured folder
|
||||
- Change where the shard store is located on disk by changing the `path` of the `[shard_db]` stanza in the `rippled.cfg` file.
|
||||
- Change the shard store back to using NuDB.
|
||||
|
||||
@@ -22,7 +22,7 @@ If your server crashes randomly during operation or as a result of particular co
|
||||
|
||||
- Is your server running out of memory? On some systems, `rippled` may be terminated by the Out Of Memory (OOM) Killer or another monitor process.
|
||||
- If your server is running in a shared environment, are other users or administrators causing the machine or service to be restarted? For example, some hosted providers automatically kill any service that uses a large amount of a shared machine's resources for an extended period of time.
|
||||
- Does your server meet the [minimum requirements](install-rippled.html#minimum-system-requirements) to run `rippled`? What about the [recommendations for production servers](capacity-planning.html#recommendation-1)?
|
||||
- Does your server meet the [minimum requirements](system-requirements.html) to run `rippled`? What about the [recommendations for production servers](system-requirements.html#recommended-specifications)?
|
||||
|
||||
If none of the above apply, please report the issue to Ripple as a security-sensitive bug. If Ripple can reproduce the crash, you may be eligible for a bounty. See <https://ripple.com/bug-bounty/> for details.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user