Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docker and error code 13 to troubleshooting chapter #13133

Merged
merged 5 commits into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions book/run/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,40 @@

This page tries to answer how to deal with the most popular issues.

- [Troubleshooting](#troubleshooting)
- [Database](#database)
- [Docker](#docker)
- [Error code 13](#error-code-13)
- [Slow database inserts and updates](#slow-database-inserts-and-updates)
- [Compact the database](#compact-the-database)
- [Re-sync from scratch](#re-sync-from-scratch)
- [Database write error](#database-write-error)
- [Concurrent database access error (using containers/Docker)](#concurrent-database-access-error-using-containersdocker)
- [Hardware Performance Testing](#hardware-performance-testing)
- [Disk Speed Testing with IOzone](#disk-speed-testing-with-iozone)


## Database

### Docker

Externally accessing a `datadir` inside a named docker volume will usually come with folder/file ownership/permissions issues.

**It is not recommended** to use the path to the named volume as it will trigger an error code 13. `RETH_DB_PATH: /var/lib/docker/volumes/named_volume/_data/eth/db cargo r --examples db-access --path ` is **DISCOURAGED** and a mounted volume with the right permissions should be used instead.

### Error code 13

`the environment opened in read-only code: 13`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we map this error code to a new error variant that displays this recommendation?


Externally accessing a database in a read-only folder is not supported, **UNLESS** there's no `mdbx.lck` present, and it's called with `exclusive` on calling `open_db_read_only`. Meaning that there's no node syncing concurrently.

If the error persists, ensure that you have the right `rx` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed:

```bash,ignore
stat /full/path/datadir
```


### Slow database inserts and updates

If you're:
Expand Down
Loading