Can't get a node to run on a 4GB Raspberry Pi 4. Works fine on a 8GB one

I have just made a slightly distressing discovery - I can’t get a node running on a 4GB Raspberry Pi4! I’ve tried on 2 of them I have deployed in friends houses with the same result.

I get this error:- ant node start ✗ Failed to start 1 node(s): ● node1 (1) — Process spawn failed: Node 1 exited immediately: Error: 0: node startup failed: Failed to create LMDB storage: storage error: Failed to open LMDB env: Cannot allocate memory (os error 12) Location: src/bin/ant-node/main.rs:155 Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets.

After some googling and some Clauding and trying changing ulimit settings and allowing overcommit of memory I’ve just about given up. I think there just isn’t enough RAM for a node to run on a Pi4 with only 4GB with the way the the node works. I’ll try on a Ubuntu VM later to see if it’s Pi or Pi OS specifc. Yes, I’m using the Pi version of Ubuntu.

I’ve seen using top that a node claims 110.9 GB of virtual RAM! Even though a running node only uses less than 100MB really.

Does anyone have any ideas? Is this a known issue?

(sorry for the cross post with the forum but I think this is the best place because of the ephemeral nature of Discord!)

I am about to try on a Pi4 4gb

In other news the desktop app is now released for the cli-averse

Where did you download the ant binary for your Pi4?

I tried from downloads.autonomi.com/node/aarch64 but I get a Binary exec format error

I just used the curl command to download ‘ant’ and then did the:-

ant node add

ant node daemon start

ant node start

Works fine on a both the 8GB Pi4s I have in my small fleet. Total no go on both the 4GB ones. Bit of a pisser if they never work because I have another few to go out to people.!

1 Like

Seems the problem is in the database initialisation. Guess the LMDB library routines want the memory for some reason to setup the database files

1 Like

Is that something that can be easily fixed?

THere are many 4gb SBCs kicking about 8gb ones are a very different story.

Not sure, and likely would have to be done during build. A configuration change that gets passed to the library. The pitfalls of developing on higher end machines and testing on such

1 Like

Looking forward to node v0.10.1 ASAP then.

1 Like