spesmilo / electrumx

Alternative implementation of spesmilo/electrum-server
MIT License
432 stars 343 forks source link

server got shutdown after many days. struct.error: 'H' format requires 0 <= number <= 65535 #178

Closed Jessie-1 closed 2 years ago

Jessie-1 commented 2 years ago

Version : 1.16.0

error log : https://pastebin.com/raw/6QcDEErG

Same happened with latest commit fb037fbd23b8ce418cd67d68bbf8d32e69ecef62

error log : https://pastebin.com/raw/k55F2uAE

cipig commented 2 years ago

it's https://github.com/spesmilo/electrumx/issues/88 you need to run electrumx_compact_history regularly to avoid it how often depends on the coin's block time i do it automatically with cron once a week

Jessie-1 commented 2 years ago

Can you share the cron job. Looks like the server needs to be shutdown before running it.

cipig commented 2 years ago

i have eg this

0 5 * * 2 sudo systemctl stop electrumx_KMD && COIN=Komodo DB_DIRECTORY=/electrumdb/KMD electrumx_compact_history && sudo systemctl start electrumx_KMD

to do it every Tuesday at 05:00 you may need to adapt it a bit though... i configured electrumx as systemd service and i also have the binaries in my PATH (/usr/local/bin) you need to stop, start electrumx_compact_history by passing the COIN and DB_DIRECTORY variable to it and then start when it's done