Bitcoin Forum
May 08, 2024, 06:28:27 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Full node on Raspberry 3: Out of memory  (Read 151 times)
JorisK (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 128



View Profile
January 03, 2020, 12:09:38 PM
Merited by ABCbits (1), Jet Cash (1)
 #1

Hi,

As the topic states:

1. I have a Raspberry 3+
2. I downloaded the binaries from bitcoincore.org
3. I have a simple bitcoin.conf which only states it should run as a daemon.
4. Everything fully updated.

And this happens:
2020-01-03T11:59:38Z UpdateTip: new best=00000000000000e90ef3bf0107078c5b16c1fd576ba131ee75ecda4ad4531eae height=235028 version=0x00000002 log2_work=69.96869 tx=17366192 date='2013-05-07T20:21:55Z' progress=0.035347 cache=660.8MiB(5855425txo)
2020-01-03T12:00:02Z Error: Out of memory. Terminating.

Anyone any clue?

1715149707
Hero Member
*
Offline Offline

Posts: 1715149707

View Profile Personal Message (Offline)

Ignore
1715149707
Reply with quote  #2

1715149707
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
DaveF
Legendary
*
Offline Offline

Activity: 3472
Merit: 6266


Crypto Swap Exchange


View Profile WWW
January 03, 2020, 01:10:17 PM
 #2

There is an entire discussion on running on a RPi here: https://bitcointalk.org/index.php?topic=5196287.0

It's not simple but you can do it with some tinkering.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7486


Crypto Swap Exchange


View Profile
January 03, 2020, 07:06:03 PM
Merited by malevolent (1), BitcoinFX (1)
 #3

You need to configure your Bitcoin Core to use less resource. Try this answer https://bitcoin.stackexchange.com/a/50743

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
DaCryptoRaccoon
Hero Member
*****
Offline Offline

Activity: 1202
Merit: 582


OGRaccoon


View Profile
January 03, 2020, 09:04:02 PM
Last edit: January 03, 2020, 11:46:26 PM by MagicByt3
Merited by LoyceV (1), BitcoinFX (1)
 #4

It looks like compile may run out of memory.

You could try 'free -m' option to check your free memory then if you need to you can add some swap space with the code below.

You many need to use sudo command for the swap space.

To add a 1gb swap file, in /swapfile:


Code:
sudo dd if=/dev/zero of=/swapfile bs=1024M count=1000
sudo mkswap /swapfile
sudo swapon /swapfile


After compiling turn OFF swap

Code:
Code:
sudo swapoff /swapfile
sudo rm /swapfile

┏━━━━━━━━━━━━━━━━━┓
┃   💎 Mine Solo with CKPool 💎    ┃
┃    ➤ Hit Blocks on Your Own!      ┃
┃ ███▓▓  ███▓▓  ███▓▓  ███▓▓┃
Carlton Banks
Legendary
*
Offline Offline

Activity: 3430
Merit: 3074



View Profile
January 04, 2020, 08:37:50 AM
Merited by LoyceV (1), BitcoinFX (1)
 #5

add a 1gb swap file

if you can avoid it, don't create the swapfile on the SD card but instead on an external disk, preferably an SSD (swapping memory pages between the swapfile and RAM is a performance bottleneck). The constant writing to the SD card will kill the card far quicker than you would expect otherwise.

Vires in numeris
BitcoinFX
Legendary
*
Offline Offline

Activity: 2646
Merit: 1720


https://youtu.be/DsAVx0u9Cw4 ... Dr. WHO < KLF


View Profile WWW
January 04, 2020, 11:13:20 AM
Merited by Deathwing (2)
 #6

It looks like compile may run out of memory.

You could try 'free -m' option to check your free memory then if you need to you can add some swap space with the code below.

You many need to use sudo command for the swap space.

To add a 1gb swap file, in /swapfile:


Code:
sudo dd if=/dev/zero of=/swapfile bs=1024M count=1000
sudo mkswap /swapfile
sudo swapon /swapfile


After compiling turn OFF swap

Code:
Code:
sudo swapoff /swapfile
sudo rm /swapfile

I'd be inclined to make the swapfile persistent, I usually do ...

Code:
sudo dd if=/dev/zero of=/swapfile bs=64M count=16

where count=4 = 256 MB , count=8 = 512 MB , count=16 = 1G , count=32 = 2G etc.

Code:
sudo chmod 600 /swapfile

Code:
sudo mkswap /swapfile
sudo swapon /swapfile

make swapfile persistent ...

Code:
sudo nano /etc/fstab

add at base of file ...

Code:
/swapfile   none    swap    sw    0   0

...

also for server ...

Code:
sudo nano /etc/sysctl.conf

add at base of file ...

Code:
vm.swappiness = 60
vm.vfs_cache_pressure = 50

desktop !
vm.swappiness = 10

check with ...

Code:
cat /proc/sys/vm/vfs_cache_pressure
cat /proc/sys/vm/swappiness

other useful commands ...

check for existing swapfile ...

Code:
sudo swapon -s

filesystem (diskspace) ...

Code:
df -h

...

running ...

Code:
top

in a new terminal window (or Screen) is always useful for monitoring %CPU and %MEM to gain a better indication of what is actually happening.

I've not run an RPi in a while, although as Carlton has said an SSD is the safer bet.

 Smiley

"Bitcoin OG" 1JXFXUBGs2ZtEDAQMdZ3tkCKo38nT2XSEp | Bitcoin logo™ Enforcer? | Bitcoin is BTC | CSW is NOT Satoshi Nakamoto | I Mine BTC, LTC, ZEC, XMR and GAP | BTC on Tor addnodes Project | Media enquiries : Wu Ming | Enjoy The Money Machine | "You cannot compete with Open Source" and "Cryptography != Banana" | BSV and BCH are COUNTERFEIT.
JorisK (OP)
Full Member
***
Offline Offline

Activity: 199
Merit: 128



View Profile
January 04, 2020, 12:09:50 PM
Merited by LoyceV (1)
 #7

You need to configure your Bitcoin Core to use less resource. Try this answer https://bitcoin.stackexchange.com/a/50743

Awesome, I left out the mempool and lowered the signaturecache as well, and now memory usage flows around 500MB (I have 1GB).

Looks like I can move on, many thanks everyone!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!