Pages:
Author

Topic: Electrum server discussion thread - page 8. (Read 61507 times)

legendary
Activity: 1896
Merit: 1353
July 01, 2015, 03:06:26 AM
if you run an electrum server, it is time to upgrade!

Two fixes were added recently:
 - support for arbitrary p2sh scripts (will be required by electrum 2.4 client)
 - memory pool efficiency fix, added after the recent 'stress test' (servers without this patch are too slow)

note: 2.4 clients will only connect to servers that have upgraded
sr. member
Activity: 278
Merit: 254
June 09, 2015, 05:16:01 PM
Thomas could you please post your opinion on this issue:

http://www.reddit.com/r/Electrum/comments/38qi2m/20_mb_blocks_the_end_of_electrum/

It seems likely that only a small change will be needed to the server code to handle larger blocks.  However, there is a more serious problem related to the traffic load of the bitcoin network.  The Electrum server code is inefficient and with a slow processor can often fall behind the Bitcoin network.  Even with the present size blocks if a large block hits the network immediately followed by a second block then the server will be two blocks back and the client will report that the server is lagging.

I run a private Electrum server on an Atom (Haswell) based Intel NUC, with 8 GB RAM and an SSD. Bitcoind has no problem keeping up with the network, using only a few percent of the CPU load and this slow machine would have a chance of keeping up with 20MB blocks, given that it is running at about 3 percent CPU loading today.  However, the Electrum server uses about seven times as much CPU time per block as bitcoind, so there is zero chance it will handle a large expansion in network transaction rate. Actually, I consider this server code to be marginal with present network traffic, because I get occasional "server lagging" messages with my clients. Incidentally, one of the things that put me off from Electrum a few years ago were these "server lagging" messages, which I took to be an indication that something was wrong with the Electrum system.  People want to start their client and immediately do a transaction without any network delays or other BS. (In this regard even with the typical "lagging" delays, quick start up with Electrum is still better than Multibit if the client has been off-line for several days, at least with my network access speed.  If bitcoind is not kept online 24/7 then its start up performance is worse than hopeless.)

I assume that the Electrum server code could be tweaked or rewritten to make it run substantially faster.  I can think of no good reason why the Electrum server should use any more processor time than Bitcoin while keeping up with the network. Indeed, on my system the unavoidable use of processor time is probably doing signature checking by bitcoind. It don't believe there is anything that the Electrum Server needs to do that is remotely as CPU intensive.  If I had limited RAM or a spinning rust disk then perhaps there would be a hard reason why the Electrum server was slow.

I'm not complaining at present, but I think some work is needed and is possible to cover future increases in network traffic.




hero member
Activity: 968
Merit: 515
June 09, 2015, 03:02:58 PM
Thomas could you please post your opinion on this issue:

http://www.reddit.com/r/Electrum/comments/38qi2m/20_mb_blocks_the_end_of_electrum/
newbie
Activity: 4
Merit: 0
June 05, 2015, 03:08:19 AM
It happened yesterday, from /var/log/electrum.log:

[04/06/2015-18:35:52] addr not in tree 1c0b8f470c0b7a32792c6cbacf3a9b00e72d93b1e516b1d2de130ab4a4e2be1dde3570be097e005 f0ebacca65b21aa859bfa4f1a01000000 13ZHmZ15qKNLbttUFZoTYDdwhqfpfjZGmP !7ls{

The server then stopped catching up with bitcoind and I had to download snapshot from foundry. I checked syslog but found no errors reported regarding the disk.
member
Activity: 65
Merit: 10
June 04, 2015, 11:32:46 PM
Now if I try "sudo electrum-server getinfo" the electrum-server process blocks and nothing happens. The log does not show anything. Process cpu usage is at ~100%.

Any suggestions on how to debug this?
@fex,

The electrum-server DB has to catch-up.  It isn't a verbose process but seeing the CPU usage will assure you it is working.  The log will only update after passing every 1000 blocks.  Note it can take an hour or two to catch-up just 10-12 hours (on a modern CPU with an SSD).

Yes, I found this to be the case, but there was another thing.

I finally had some time to look into the problem: there were too many files open. I did change the limit for this in /etc/security/limits.conf as described on github, however, two things to note:

1. If you put an entry like " hard nofile 65536" in limits.conf, it will only work if is really logged in. It does not work (at least on Ubuntu 14.10) when another user account loggs in and then uses "su" to get into the account. This might be a problem when using "electrum-server" binary as it seems to use "su". To solve this, I added limits.conf-entries for the "really logged in" user account that starts the "electrum-server" binary.

Maybe this information could be added to the readme on Github somehow.

2. The error indicating that too many files were open was burried under a stack trace that I got when I was running run_electrum_server directly (instead of "electrum-server start"). It did not show up in the log file.



Regards,

Felix


This page describes how to increase the open files limit for a user
https://github.com/spesmilo/electrum-server/blob/master/HOWTO.md#step-10-tweak-your-system-for-running-electrum

Code:
 sudo echo "bitcoin hard nofile 65536" >> /etc/security/limits.conf
 sudo echo "bitcoin soft nofile 65536" >> /etc/security/limits.conf

In Ubuntu 14.04 you must also edit /etc/pam.d/common-session
Code:
sudo nano  /etc/pam.d/common-session

Add this to the end of the file
Code:
session required pam_limits.so



legendary
Activity: 1708
Merit: 1009
$XVG - The Standard in Crypto as a Currency!
June 01, 2015, 11:40:36 AM
Hi, can you please take a look and assist if you can. Thanks.

https://bitcointalksearch.org/topic/m.11494471

Electrum for DOGE?!?



DOGED*

the client is complete, we are just having some issues with the back end (electrum server)

https://bitcointalksearch.org/topic/m.11504413
legendary
Activity: 1666
Merit: 1000
June 01, 2015, 05:42:11 AM
Hi, can you please take a look and assist if you can. Thanks.

https://bitcointalksearch.org/topic/m.11494471

Electrum for DOGE?!?

hero member
Activity: 658
Merit: 500
June 01, 2015, 03:19:28 AM
Hi, can you please take a look and assist if you can. Thanks.

https://bitcointalksearch.org/topic/m.11494471
donator
Activity: 2772
Merit: 1019
May 31, 2015, 01:57:53 AM
just pulled newest master from https://github.com/spesmilo/electrum-server.git

Not sure if It's new, but I'm seeing this in the log:

Code:
INFO:electrum:joining IRC
Exception in thread Thread-6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/home/nick/electrum-server/src/ircthread.py", line 118, in run
    client = irc.client.Reactor()
AttributeError: 'module' object has no attribute 'Reactor'

my wild guess: my python-irclib is outdated? I'm on debian:

Code:
user@null:~/electrum-server$ apt-cache show python-irclib
Package: python-irclib
Version: 0.4.8-1

EDIT: problem now obsolete. I had to migrate to a different server (now ssd ;-) for harddrive failure reasons and the problem doesn't occur there. I also again have more than 10 session. I guess my irc stuff was borked all along.
legendary
Activity: 1666
Merit: 1000
April 30, 2015, 04:10:44 PM

If the root hash is wrong, is the db automatically repaired or something?


Nope, need to download a new version from the foundry (http://foundry.electrum.org/leveldb-dump/).  I wouldn't suggest building a new one as it will take over a month (I know, doing it now)
donator
Activity: 2772
Merit: 1019
April 29, 2015, 11:17:10 AM
It happens a lot that my server (electrum.0x0000.de) gets kicked from the list.

I'm thinking it might be because it takes quite a while for it to digest new blocks and it's marked as "lagging".

Is that possible?

No, a server does not get kicked because it is lagging.
It happens because your database is corrupted, and your server fails to produce the correct root hash.

database corruption may occur if you do not shutdown your server cleanly.

Well, it's on and off the list without me doing anything.

If the root hash is wrong, is the db automatically repaired or something?
legendary
Activity: 1896
Merit: 1353
April 28, 2015, 02:30:20 AM
It happens a lot that my server (electrum.0x0000.de) gets kicked from the list.

I'm thinking it might be because it takes quite a while for it to digest new blocks and it's marked as "lagging".

Is that possible?

No, a server does not get kicked because it is lagging.
It happens because your database is corrupted, and your server fails to produce the correct root hash.

database corruption may occur if you do not shutdown your server cleanly.
fex
full member
Activity: 145
Merit: 100
April 27, 2015, 04:19:40 PM
Now if I try "sudo electrum-server getinfo" the electrum-server process blocks and nothing happens. The log does not show anything. Process cpu usage is at ~100%.

Any suggestions on how to debug this?
@fex,

The electrum-server DB has to catch-up.  It isn't a verbose process but seeing the CPU usage will assure you it is working.  The log will only update after passing every 1000 blocks.  Note it can take an hour or two to catch-up just 10-12 hours (on a modern CPU with an SSD).

Yes, I found this to be the case, but there was another thing.

I finally had some time to look into the problem: there were too many files open. I did change the limit for this in /etc/security/limits.conf as described on github, however, two things to note:

1. If you put an entry like " hard nofile 65536" in limits.conf, it will only work if is really logged in. It does not work (at least on Ubuntu 14.10) when another user account loggs in and then uses "su" to get into the account. This might be a problem when using "electrum-server" binary as it seems to use "su". To solve this, I added limits.conf-entries for the "really logged in" user account that starts the "electrum-server" binary.

Maybe this information could be added to the readme on Github somehow.

2. The error indicating that too many files were open was burried under a stack trace that I got when I was running run_electrum_server directly (instead of "electrum-server start"). It did not show up in the log file.



Regards,

Felix
sr. member
Activity: 503
Merit: 283
April 17, 2015, 07:48:51 AM
Hi! Does anybody have any working sample of using Electrum RPC daemon using curl?

I'm trying to use such request (this was taken from bitcoind rpc server sample):

Code:
curl --data-binary '{ "id": 0, "method": "server.version", "params": [ "1.9.5", "0.6" ] }'  -H 'content-type: text/plain;' http://127.0.0.1:8000/

... but as a result I have an answer:

Code:
<class 'xml.parsers.expat.ExpatError'>:not well-formed (invalid token): line 1, column 0
legendary
Activity: 1666
Merit: 1000
April 03, 2015, 04:28:52 PM
@fex,

The electrum-server DB has to catch-up.  It isn't a verbose process but seeing the CPU usage will assure you it is working.  The log will only update after passing every 1000 blocks.  Note it can take an hour or two to catch-up just 10-12 hours (on a modern CPU with an SSD).

fex
full member
Activity: 145
Merit: 100
April 03, 2015, 12:13:26 PM
Hi,

I'm setting up an electrum server and have a problem getting the run_electrum_server running correctly - this process does not seem to respond.

Steps taken:
- installed electrum server using the provided python script
- setup a user account and specified it in /etc/electrum.conf
- increased allowed file handels for user in /etc/security/limits.conf
- downloaded a leveldb dump, set ownership of all files to user

- start server:
Code:
> sudo electrum-server start
Starting server as daemon
bash: line 0: ulimit: open files: cannot modify limit: Operation not permitted
nohup: redirecting stderr to stdout

- log says:
Code:
[03/04/2015-19:01:15] Starting Electrum server on XXX.XXX.XXX.XXX
[03/04/2015-19:01:15] Database version 3
[03/04/2015-19:01:15] Blockchain height 350446
[03/04/2015-19:01:15] UTXO tree root hash: b8bcc0587c80e07e3fd56da7e85faf2676d8dc35da1b1094f236936af1eeb958
[03/04/2015-19:01:15] Coins in database: 1400838008059941
[03/04/2015-19:01:15] TCP server started on XXX.XXX.XXX.XXX:50001

Now if I try "sudo electrum-server getinfo" the electrum-server process blocks and nothing happens. The log does not show anything. Process cpu usage is at ~100%.

Any suggestions on how to debug this?
legendary
Activity: 1526
Merit: 1002
Bulletproof VPS/VPN/Email @ BadAss.Sx
February 24, 2015, 08:31:27 AM
electrum.badass.sx (p10000) is added with no logging (/dev/null).

On my host, in addition to bitcoind data, it currently uses 16GB (pruning_limit=10000)


Don't forget, you need the BTC blockchain also which is 37GB atm.
newbie
Activity: 1
Merit: 0
December 23, 2014, 03:52:04 AM
  I have a trouble when i installed the electrum server.
every thing has been done before run "electrum-server start" command to launch electrum server.
but it print an error: "ImportError: /home/bitcoin/.python-eggs/plyvel-0.9-py2.7-linux-x86_64.egg-tmp/plyvel/_plyvel.so: undefined symbol: _ZN6snappy13RawUncompressEPKcmP".
I have google with the key word "_ZN6snappy13RawUncompressEPKcmP". i found a reference in this page("https://github.com/wbolster/plyvel/issues/5"). I do as this page said, but finally failed.
my leveldb is 1.9, i install the liblevedb1,libleveldb-dev,plyvel.

can somebody help me with this big problem.thanks a lot!
 Sad
legendary
Activity: 952
Merit: 1000
December 04, 2014, 02:38:48 PM
What's the disk size required at the moment to run an Electrum server?
On my host, in addition to bitcoind data, it currently uses 16GB (pruning_limit=10000)
Was hoping I could run an Electrum server on a $10 VPS on DigitalOcean. I'll have to find another host then. Thanks.
donator
Activity: 2772
Merit: 1019
December 04, 2014, 02:24:40 PM
What's the disk size required at the moment to run an Electrum server?

On my host, in addition to bitcoind data, it currently uses 16GB (pruning_limit=10000)
Pages:
Jump to: