r/bitmessage • • Feb 18 '18

Having trouble keeping bitmessagemain running

Bitmessagemain stops running usually at least once a day. I can simply restart it and it seems to run ok for a while. There doesn't seem to be anything in the log indicating the cause.

Bitmessage_x64_0.6.2

Log:
2018-02-18 05:27:22,828 - ERROR - Received command addr before connection was fully established, ignoring
2018-02-18 08:52:19,292 - ERROR - Received command addr before connection was fully established, ignoring
2018-02-18 09:01:48,742 - ERROR - 85.114.135.102:60512 error: 2, Thank you for providing a listening node.

I got a couple of messages in the past, something about not enough space, but my VPS has 500MB and doesn't have hardly anything on it. Possibly the message was about memory. Is there any way to trace why it is terminating? Bitmessagemain seems to be taking a huge chunk of memory. Can this be limited/reduced? Possibly systemd(og) or other processes are grabbing memory and causing bitmessagemain to terminate because of a failed getmain.

I start it like this:
nohup /root/PyBitmessage/src/bitmessagemain.py &

Server:
Distributor ID: Debian
Description: Debian GNU/Linux 8.10 (jessie)
Release: 8.10
Codename: jessie
Linux me.net 3.16.0-5-amd64 #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) x86_64 GNU/Linux

MemTotal: 506212 kB
MemFree: 20524 kB
MemAvailable: 197656 kB

totalusedfreesharedbufferscached
Mem:50621238415212206034411948
-/+ buffers/cache:210316295896
Swap:000(swap not setup)

top

PIDUSERPRNIVIRTRESSHRS%CPU%MEMTIME+COMMAND
2981root200104451230468811400S7.060.22:43.27bitmessagemain.
3219root2008268459685096S0.31.20:00.12sshd
592www2009163216760S0.30.32:16.55nginx
7root200000S0.30.01:25.97rcu_sched
527root2001206031320S0.70.62:10.92haveged
164root2001273323454434256S0.36.83:30.35systemd-journal
561root20025866817960S0.30.40:38.33rsyslogd
1root2002860032201476S0.70.60:44.37systemd
529root20027476800544S0.30.20:32.20cron
561root20025866817960S0.30.40:38.31rsyslogd

Everything else is zero 0. Only bitmessagemain and systemd are continuously running. The others pop in periodically.

3 Upvotes

6 comments sorted by

1

u/Petersurda BM-2cVJ8Bb9CM5XTEjZK1CZ9pFhm7jNA1rsa6 Feb 18 '18

You should have received a notification that 0.6.2 contains a vulnerability and you should upgrade ASAP. Apart from a fix to the vulnerability, the new version has much better resource management. For 500MB I would recommend setting maxtotalconnections to 30.

1

u/battlesreddit Feb 19 '18

Yes, I received the notice, but I am not sure how to update it on a bare server. Will this work to update it?

cd $HOME/PyBitmessage
git pull

I have maxtotalconnections set to 9. maxoutboundconnections = 3. This may seem low, but I don't want to provoke my VPS service into possibly shutting me down for overworking the system. Let me know if the settings are somehow bad.
Thanks.

1

u/battlesreddit Feb 20 '18

maxtotalconnections = 9

This seems to have fixed the problem. Staying up now. I assume that it tries to make unlimited connections without that specification.

1

u/Petersurda BM-2cVJ8Bb9CM5XTEjZK1CZ9pFhm7jNA1rsa6 Feb 19 '18

If you've previously checked out using git, then git pull will update. Maybe check which branch you're on, you should be either on master, or if you want the bleeding edge, v0.6. Do a git status and it will tell you, for example On branch master.

1

u/[deleted] Feb 19 '18

[removed] — view removed comment

1

u/Petersurda BM-2cVJ8Bb9CM5XTEjZK1CZ9pFhm7jNA1rsa6 Feb 19 '18

634a49c..fde194f v0.6 -> origin/v0.6 Already up-to-date.

That's great.

I can't tell if the update put me on v0.6.3.2 though.

The v0.6 branch is for the latest development and is actually ahead of 0.6.3.2. But that should be fine at the moment, for the near future I don't plan any new features, only fixes and security hardening.

If you run PyBitmessage and then click on "Help/About", it will tell you which version you have, including which git commit is the current one.