Node crashes after trying to fetch leaderlogs

I am trying to pull leader logs using cncli for my pool, but whenever I do the node crashes and a failure to allocate memory error occurs. I doubled the machine’s ram from 12gb → 30gb and it doesn’t seem to have done anything.
When investigating RAM it can be seen that the node is using ~12gb as expected and recognises the 30gb available, but where is the rest of it going?
image
Upon a restart the expected memory usage is consumed and 18gb is free. After only a few minutes that number is reduced to 250mb. Is this some memory leak or have I misconfigured something?

1 Like

I see 2 cncli process still running

Those are sendTip and sync

Yeah but one is using 40% of the CPU, maybe the CPU is the issue, not the RAM

Check why is using so much CPU

To solve the issue with cncli increase the SWAP to at least 4G

I must have taken the screenshot at a bad time, the process is not using this much constantly.

Increase the SWAP size

Doesn’t look like it helped.
image

The node crashed again? With 32G RAM + 4G SWAP file?

I’m having a similar issue where the node will crash shortly after coming online and fully syncing. The problem seems to be the cncli sync function which will consume a bunch of memory + cpu through the cardano-cli query stake-snapshot call.

Here is a screenshot just before it crashes:

Screenshot from 2021-11-26 01-40-24

The htop version is more informative but wasn’t sure if it would give out some sensitive information.

PS: I run another pool as well and that bp doesn’t seem to have any issues…

type free -m on both… I see on this node you don’t have the SWAP file configured

Adding a 4GB swap file allowed the node to make it through the peak memory load cause by cncli sync

You’re the man Alex <3

What do you suggest setting the swappiness value to?

1 Like

I don’t know 4GB should be enough… but if you will need more you can increase to 6G or 8 … but it will reduce your HDD/SDD space

If you use the most recent version of cncli you can use an alternative way to get leaderlog info: Cncli leaderlog - #23 by Alexd1985