-
Notifications
You must be signed in to change notification settings - Fork 387
server stops suddenly / std::bad_alloc memory exhaustion #126
Comments
You can try to run run_electrum_server directly and see if it spits out more info. |
INFO:electrum:Starting Electrum server on 127.0.0.1 File "build/bdist.linux-x86_64/egg/electrumserver/blockchain_processor.py", line 57, in init |
you have to run run_electrum_server.py, not run_electrum_server |
Maybe the database was corrupt. I have deleted electrum's database and downloaded it again from foundry. Started fine and working for last hours under normal parameters... slowly catching up. Could my database just get corrupted on the fly, without anyone doing anything wrong? I know how to start/stop the server and never kill -9 electrum. |
@ecdsa It have downloaded a fresh leveldb dump from foundry, started again and it died again unfortunately. There is a bug here. I run run_electrum_server.py in console and here is what I get: INFO:electrum:Starting Electrum server on 127.0.0.1 What could be the issue? I have the correct limits setup in /etc/security/limits.conf for the user running electrum. |
If this is a ubuntu install you also need to edit /etc/pam.d/common-session and add |
@abitfan I am on Debian Jessie. I have in /etc/security/limits.conf the following appended: |
Actually the common-session mod is required for debian as well |
@abitfan can you let me know step by step what do I need to do in order to enable it? thanks. |
as root: |
I have done that. now the limit is 65536 for 'bitnode' which is the user I run electrum-server as. sudo -u bitnode -i run_electrum_server.py |
Can you try this with a fresh db ? |
Ok. I have tried with fresh DB 10 times. Correct dbs, checked the hash and everything. INFO:electrum:Starting Electrum server on 127.0.0.1 I am on latest commit. What could be wrong? |
bad_alloc sounds like memory exhaustion. Try allocating more swap space. |
My swap allocated space looks empty. This machine used to work with electrum very well. Can it suddenly require more swap space? |
Tried 100 more times with different changes, it still won't work. We already know that leveldb uses the disk very much, it needs SSD. So, I will close this, since I don't see a bug in electrum-server. The last log message is: You can see it takes a lot to expand blocks. The RAM/CPU/Swap space resources are plenty, but the hard disk is not. |
I'm seeing the same issue here: It's definitely running out of memory / swap. This might be related to recent changes like "writing once per block" or the "ordering of tx" stuff. server versions from June 2015 don't have this issue. Unless memory footprint can be reduced we should recommend at least 8 GB or RAM - better 16 GB - for running electrum server |
Any update on this? I'm still seeing electrum-server taking 16GB of RAM + 4 GB swap on a server when processing blocks... |
We're investigating the issue. Thomas' server is using less than 2 gigs of RES RAM, while I'm at 11 gig. It might be the plyvel verison. I've updated to 0.9 (from 0.2) recently - still running leveldb 1.9.x (2013) with it. Thomas is using leveldb 1.9.x and plyvel 0.8. Which pyvel versions are you using? For now I get a stable running server with 16 GB RAM + 16 GB swap. Around 6 GB swap gets used so I can recommend setting 24 Gigs of RAM + swap. |
Sorry, no progress here currently. The RAM recommendations still stand. I've put them into the HOWTO for now |
Hi,
Server was running fine. Just upgraded to latest commits few days ago. Now when I type electrum-server starts, it looks like it starts (take some time) but when I run electrum-server getinfo (after ~1 minute) it says server not running. There is nothing in the log files which would be interesting, except starting TCP Server on ... and starting SSL server on...
bitcoind is working good, didn't touch it. I have tried restarting bitcoind as well, and then then electrum server started and was running for few hours, but died again with nothing in the logfile. How can I debug this?
The text was updated successfully, but these errors were encountered: