kyuupichan / electrumx

Alternative implementation of spesmilo/electrum-server
Other
723 stars 733 forks source link

electrumx hanging after start #940

Closed cryply closed 4 years ago

cryply commented 4 years ago

Hallo! Thank you for your awesome ElectrumX server.

I am using electrumx for our coin. Im using VPS with 2GB of RAM. vmstat 1 10 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 2 0 0 92380 19192 648796 0 0 1587 57 13 22 69 8 22 1 0 3 0 0 92184 19192 648796 0 0 0 0 489 818 99 1 0 0 0

--- ENV vars ---- ENV HOME /data
ENV ALLOW_ROOT 1
ENV DB_DIRECTORY /data
ENV DB_ENGINE rocksdb
ENV REORG_LIMIT 200
ENV SERVICES=tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8778
ENV SSL_CERTFILE ${DB_DIRECTORY}/electrumx.crt
ENV SSL_KEYFILE ${DB_DIRECTORY}/electrumx.key
ENV LOG_LEVEL debug
ENV ANON_LOGS=NONE
ENV MAX_SESSIONS=200
ENV PEER_DISCOVERY=OFF
ENV PEER_ANNONCE=OFF
ENV CACHE_MB=15

---- shell script to start electrumx docker -----------

!/bin/sh

docker run \
-v /home/electrumx:/data \
-e DAEMON_URL=http://u:x@127.0.0.1:48887 \
-e COIN=CranePay \
-p 50001:50002 -p 8778:8778 --network="host" \
elecrp:1.6

------------- ElectrumX log ------------- ./run_ele.sh [11/1823] WARNING: Published ports are discarded when using host network mode INFO:electrumx:ElectrumX server starting
INFO:electrumx:logging level: DEBUG INFO:Controller:Python version: 3.7.6 (default, Dec 21 2019, 02:28:04) [GCC 8.3.0] INFO:Controller:software version: ElectrumX 1.12 INFO:Controller:aiorpcX version: 0.18.4
INFO:Controller:supported protocol versions: 1.4-1.4.2
INFO:Controller:event loop policy: None
INFO:Controller:reorg limit is 200 blocks INFO:Daemon:daemon #1 at 127.0.0.1:48887/ (current INFO:DB:switching current directory to /data INFO:DB:using rocksdb for DB backend INFO:DB:opened UTXO DB (for sync: True) INFO:DB:DB version: 6 INFO:DB:coin: CranePay INFO:DB:network: mainnet INFO:DB:height: 1,906,601 INFO:DB:tip: 00000076eb1762bf8d8d8919ccfc69a38f735a41eeaa436901eecb1ec83cfcf4 INFO:DB:tx count: 2,506,809 INFO:DB:flushing DB cache at 15 MB INFO:History:history DB version: 0 INFO:History:flush count: 1,806 INFO:SessionManager:RPC server listening on 0.0.0.0:8778 INFO:Prefetcher:catching up to daemon height 1,906,666 (65 blocks behind) INFO:BlockProcessor:our height: 1,906,611 daemon: 1,906,666 UTXOs 0MB hist 0MB INFO:BlockProcessor:processed 10 blocks size 0.01 MB in 0.0s INFO:BlockProcessor:processed 55 blocks size 0.04 MB in 0.0s INFO:BlockProcessor:caught up to height 1906666 INFO:DB:flushed filesystem data in 0.00s INFO:History:flushed history in 0.0s for 97 addrs INFO:DB:flushed 65 blocks with 74 txs, 135 UTXO adds, 187 spends in 0.0s, committing... INFO:DB:flush #1,807 took 0.0s. Height 1,906,666 txs: 2,506,883 (+74) INFO:DB:tx/sec since genesis: 18, since last flush: 124 INFO:DB:sync time: 1d 14h 14m ETA: 00s INFO:DB:closing DBs to re-open for serving INFO:DB:opened UTXO DB (for sync: False) INFO:DB:DB version: 6 INFO:DB:coin: CranePay INFO:DB:network: mainnet INFO:DB:height: 1,906,666 INFO:DB:tip: 0000020ca06f8278d765b40d6d60e2559ed70f507dfd53263ca3621d3092a686 INFO:DB:tx count: 2,506,883 INFO:History:history DB version: 0 INFO:History:flush count: 1,807 INFO:DB:deleted 65 stale undo entries INFO:DB:populating header merkle cache... INFO:MemPool:beginning processing of daemon mempool. This can take some time... INFO:SessionManager:max session count: 200 INFO:SessionManager:session timeout: 600 seconds INFO:SessionManager:session cost hard limit 10,000 INFO:SessionManager:session cost soft limit 1,000 INFO:SessionManager:bandwidth unit cost 5,000 INFO:SessionManager:request sleep 2,500ms INFO:SessionManager:request timeout 30s INFO:SessionManager:initial concurrent 10 INFO:SessionManager:max response size 1,000,000 bytes INFO:MemPool:synced in 0.01s INFO:MemPool:0 txs 0.00 MB touching 0 addresses INFO:MemPool:compact fee histogram: [] INFO:SessionManager:TCP server listening on all_interfaces:50001 INFO:SessionManager:SSL server listening on all_interfaces:50002 INFO:SessionManager:WSS server listening on all_interfaces:50004 INFO:PeerManager:peer discovery: OFF INFO:PeerManager:peer discovery is disabled

after that electrumx_rpc getting timeout while connected... I set port 8778 on both sides client and server. ElectrumX used as docker. Ctrl-C not closing docker. Only docker stop able to shut down.

Any chance to see why and where it is hanging? Pls help

kyuupichan commented 4 years ago

It's not hanging. You've not configured it correctly I imagine; see the Services section of the environment help