Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • crown-core crown-core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 75
    • Issues 75
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Crown
  • crown-corecrown-core
  • Wiki
  • how to fix lagging electrumx servers

how to fix lagging electrumx servers · Changes

Page history
sirak created page: how to fix lagging electrumx servers authored May 19, 2018 by Sirak Ghazaryan's avatar Sirak Ghazaryan
Hide whitespace changes
Inline Side-by-side
how-to-fix-lagging-electrumx-servers.md 0 → 100644
View page @ ed9c19b8
# Description of the issue
Electrumx has one critical issue(https://github.com/kyuupichan/electrumx/issues/185), when servers started to get desynchronized with Crown chain after about a month of work and Electrum Crown wallet start to show that server is lagging
![electrumx_lagging](/uploads/3ffeb34ef4d52f394c3d24991783a731/electrumx_lagging.PNG)
Please note that on this problem is currently working Electrumx creator, so I will import changes after the final fix is done.
But for now we need to maintain servers as soon as the problem occurs.
# Identification of issue
To be sure that you have the same problem as described in the issue above do the following steps:
1. Type the following command to show server logs
```
journalctl -u electrumx.service --no-pager -n 100
```
where `electrumx.service` is the service name and it can be different for your case
2. You will see the following lines in the logs:
```
electrumx_server.py[1755]: flush_id = pack('>H', self.flush_count)
electrumx_server.py[1755]: struct.error: 'H' format requires 0 <= number <= 65535
```
# How to fix
The following actions is needed to bring servers into the working state
1. Download the python script from electrumx repo`(only python3.6 version is supported)`:
```
wget https://raw.githubusercontent.com/Crowndev/electrumx/crown/compact_history.py
```
2. Adapt it according to your configuration:
```
# Configure it for your case, the value should be the same as set in /etc/electrumx.conf
environ['DB_DIRECTORY'] = '/db'
```
As marked in comment the value of DB_DIRECTORY should be taken from electrumx config file, which is mainly located in /etc/electrumx.conf
3. Stop the electrumx server before running the script
```
systemctl stop electrumx.service
```
where `electrumx.service` is the service name
4. Run the script
```
python compact_history.py
```
wait untill the script is finished, it may take long(up to 6 hour, depends on hardware capability)
5. Rerun electrumx server
```
systemctl restart electrumx.service
```
6. Wait a minute and test that error lines are disappeared from the server log.
```
journalctl -u electrumx.service --no-pager -n 100
```
Clone repository
  • 19.01.18 Testnet Fork Report
  • Credentials for electrumx servers
  • How to turn on off enforcement
  • Quality Assurance
  • Quality Assurance
    • Instant Send Testing
    • documents
  • Seed nodes
  • bounties
  • code of conduct
  • coding style guide
  • communications & marketing
  • community
  • community
    • Announcement Responsibilities
    • Developers
    • community built
View All Pages