Post
Topic
Board Electrum
Re: electrum-server does not respond
by
jadedjack
on 05/06/2015, 04:32:46 UTC
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