# High memory usage

**URL:** <https://forum.cardano.org/t/high-memory-usage/105269>\
**Category:** Operate a Stake Pool\
**Created:** [26 July 2022 12:10 UTC](https://forum.cardano.org/t/high-memory-usage/105269 "2022-07-26T12:10:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phyphor](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phyphor](https://forum.cardano.org/u/Phyphor)\
**Post date:** [26 July 2022 12:10 UTC](https://forum.cardano.org/t/high-memory-usage/105269/1 "2022-07-26T12:10:02Z")

</div>

Hello,

I am having an issue with my stake pool crashing at around 60% of replaying blocks. It is using up around 30 GB of ram and 16GB Swap then exiting with an error code of 137. Any ideas what is causing it to use so much?

This is my startup script:

cardano-node run +RTS -N -w -A16m -qg -qb -RTS --topology ${TOPOLOGY} --database-path ${DB\_PATH} --socket-path ${SOCKET\_PATH} --host-addr ${HOSTADDR} --port ${PORT} --config ${CONFIG} --shelley-kes-key ${KES} --shelley-vrf-key ${VRF} --shelley-operational-certificate ${CERT}

Edit: This is my block producing node, not the relay.

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [26 July 2022 18:52 UTC](https://forum.cardano.org/t/high-memory-usage/105269/2 "2022-07-26T18:52:13Z")

</div>

Check your disk storage. I had a similar problem and it was just that I was out of space on my hard drive.

---

<div class="post-metadata">

**Author:** ![Phyphor](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phyphor](https://forum.cardano.org/u/Phyphor)\
**Post date:** [26 July 2022 20:04 UTC](https://forum.cardano.org/t/high-memory-usage/105269/3 "2022-07-26T20:04:45Z")

</div>

There is plenty of space left. I have upped my swap space to 64GB and it is progressing further. I am now up to around 55GB of memory in use and at 67%. It is going much slower now though with so much swap space in use.

---

<div class="post-metadata">

**Author:** ![jeremyisme](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jeremyisme/32/54872_2.png) [@jeremyisme](https://forum.cardano.org/u/jeremyisme)\
**Post date:** [26 July 2022 20:18 UTC](https://forum.cardano.org/t/high-memory-usage/105269/4 "2022-07-26T20:18:17Z")

</div>

Something isn’t right to be using that much swap, but if it gets through, hopefully it doesn’t want that much again.

What version node are you running?

---

<div class="post-metadata">

**Author:** ![Phyphor](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phyphor](https://forum.cardano.org/u/Phyphor)\
**Post date:** [27 July 2022 03:53 UTC](https://forum.cardano.org/t/high-memory-usage/105269/5 "2022-07-27T03:53:58Z")

</div>

Well, it crashed again at around 77% at a little over 90GB of total memory space. I was at 1.35, I downgraded to 1.32.1 to try an earlier version to see if that makes any difference and so far it is not looking promising. 17.4% and I am at 18GB.

---

<div class="post-metadata">

**Author:** ![jmhoms](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/jmhoms/32/49263_2.png) [@jmhoms](https://forum.cardano.org/u/jmhoms)\
**Post date:** [27 July 2022 13:11 UTC](https://forum.cardano.org/t/high-memory-usage/105269/6 "2022-07-27T13:11:26Z")

</div>

Hi,  
did you downgrade to 1.32? or 1.34?

You should monitor what process is causing the memory consumption until it crashes, by running something like htop, while you monitor for a clarifying log message, i.e. running journalctl -f- e in a side by side terminal.

---

<div class="post-metadata">

**Author:** ![Phyphor](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phyphor](https://forum.cardano.org/u/Phyphor)\
**Post date:** [28 July 2022 14:34 UTC](https://forum.cardano.org/t/high-memory-usage/105269/7 "2022-07-28T14:34:28Z")

</div>

Hi,

I downgraded to 1.32 to see if there was a difference and there was no change in the memory usage.

It is cardano-node that is eating up the memory.

---

<div class="post-metadata">

**Author:** ![Phyphor](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phyphor](https://forum.cardano.org/u/Phyphor)\
**Post date:** [1 September 2022 19:42 UTC](https://forum.cardano.org/t/high-memory-usage/105269/8 "2022-09-01T19:42:02Z")

</div>

Just a solution I found to this. After downgrading to 1.32 it still did not update, so I went to a fresh server and reinstalled to 1.32 copying over all the configuration files and keys. This worked. I recently updated back to 1.35.3 and on the new server had the same issue.

The fix for me was swapping the starting the block producing node as a relay and after it replayed everything switched it back to a block producer and then it was able to run.
