# Rebake aborts with error message

**URL:** https://meta.discourse.org/t/rebake-aborts-with-error-message/220803
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [March 12, 2022, 11:19am UTC](https://meta.discourse.org/t/rebake-aborts-with-error-message/220803 "2022-03-12T11:19:39Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [March 12, 2022, 5:50pm UTC](https://meta.discourse.org/t/rebake-aborts-with-error-message/220803/5 "2022-03-12T17:50:29Z")

</div>

Alright!

I’m a bit surprised that I get out of memory with the rebake though, by the fact that it happens at random “stages” of the rebake, that it seems that it frees memory between each rebake batch, and the default rebake batches are fairly small by default (something like 150 posts?).

* * *

I’ve created a swap file of 2 GB following this guide. Hoping that will be OK. :slight_smile:

> [@Create a swapfile for your Linux server](https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880):
>
> bulb For servers with \<= 4GB of RAM, running ./discourse-setup will prompt for and automatically create a 2GB swapfile. Most cloud virtual machine providers do not set up swapfiles as part of their server provisioning. In particular, upgrading Discourse produces a lot of memory pressure. With a swap file, rather than randomly terminating processes with an out of memory error, things will slow down instead. Having a swap file is a cheap insurance policy that protects you from many other lo…

---

_[View the full topic](https://meta.discourse.org/t/rebake-aborts-with-error-message/220803)._
