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

Last edited by Sirak Ghazaryan Oct 15, 2018
Page history
This is an old version of this page. You can view the most recent version or browse the history.

how to fix lagging electrumx servers

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

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 electrumx repo(only python3.6 version is supported):
git clone -b crown https://github.com/Crowndev/electrumx.git;  
cd electrumx
  1. 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

  1. Stop the electrumx server before running the script
systemctl  stop electrumx.service   

where electrumx.service is the service name

  1. Run the script
python3 compact_history.py

wait until the script is finished, it may take long(up to 6 hour, depends on hardware capability),but with our hardware power it takes few minutes only

  1. Rerun electrumx server
systemctl restart electrumx.service
  1. 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