Node dies when running "cardano-cli query ledger-state"

Hi all I just registered my first stake pool [PARKS]! However I can only see it on

When I run this command to query the ledger state from my node, my CPU utilization spikes and ends up killing my node every time. Has anyone had a similar experience with this?

cardano-cli query ledger-state --mainnet | grep publicKey | grep $(cat stakepoolid.txt)


Try first redirect the ledger state into a file:
cardano-cli query ledger-state --mainnet > ledger-state.json
then grep the info
grep publicKey ledger-stake.json | grep $(cat stakepoolid.txt)

Yeah the command you posted is exactly the command I ran where it pipes the output to a file.

hmm - your command pipes the output into the input of the grep command… instead of redirecting it to a file.

Hi @laplasz, first of all, thanks for your help, it is really appreciated.

I have tried to redirect the output to a file and parse it but as soon as I run the cardano-cli query ledger-state command the node shut-down and restarts.

I am running the node on a 4 CPU - 8 GB memory vps

Do you have any idea why is still not working?

1 Like

Increasing the swap to 16GB seems to do the trick

the ledger size to date was ~3.3GB

1 Like