# "Cannot allocate memory" when upgrading

**URL:** <https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029>\
**Category:** Self-hosting\
**Tags:** server-resources\
**Created:** [May 11, 2016, 4:23am UTC](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029 "2016-05-11T04:23:42Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [May 22, 2016, 11:12pm UTC](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029/16 "2016-05-22T23:12:40Z")

</div>

Just 2gb swap file is needed, it will mostly be used only during upgrades. If you have 4gb or more ram you may not need the swapfile.

---

_[View the full topic](https://meta.discourse.org/t/cannot-allocate-memory-when-upgrading/44029)._
