# Upgrading problems

**URL:** https://meta.discourse.org/t/upgrading-problems/44659
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [May 23, 2016, 8:02am UTC](https://meta.discourse.org/t/upgrading-problems/44659 "2016-05-23T08:02:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Emmanuel\_Alex\_Wong](https://avatars.discourse-cdn.com/v4/letter/e/ee59a6/32.png) [@Emmanuel\_Alex\_Wong](https://meta.discourse.org/u/Emmanuel_Alex_Wong)
#### Post date: [May 23, 2016, 8:02am UTC](https://meta.discourse.org/t/upgrading-problems/44659/1 "2016-05-23T08:02:07Z")

</div>

Hi All,

I was wondering if anyone could advise me based on the following log when performing an upgrade.

```
Errno::ENOMEM: Cannot allocate memory - gzip -f -c -7 /var/www/discourse/public/assets/docker-manager-app-fc45ae9f5dc46a536ad03487a4ce173f.js > /var/www/discourse/public/assets/docker-manager-app-fc45ae9f5dc46a536ad03487a4ce173f.js.gz
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.6/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'
/var/www/discourse/lib/tasks/assets.rake:108:in `gzip'
/var/www/discourse/lib/tasks/assets.rake:161:in `block (4 levels) in '
/var/www/discourse/lib/tasks/assets.rake:125:in `call'
/var/www/discourse/lib/tasks/assets.rake:125:in `block in concurrent?'
/var/www/discourse/lib/tasks/assets.rake:152:in `call'
/var/www/discourse/lib/tasks/assets.rake:152:in `block (3 levels) in '
/var/www/discourse/lib/tasks/assets.rake:141:in `each'
/var/www/discourse/lib/tasks/assets.rake:141:in `block (2 levels) in '
/var/www/discourse/lib/tasks/assets.rake:125:in `concurrent?'
/var/www/discourse/lib/tasks/assets.rake:137:in `block in '
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)

```

I could see its a memory issue. But how to I overcome this?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 23, 2016, 8:04am UTC](https://meta.discourse.org/t/upgrading-problems/44659/2 "2016-05-23T08:04:49Z")

</div>

You need to add more swap. At least **2GB**

> [@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…

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 23, 2016, 8:04am UTC](https://meta.discourse.org/t/upgrading-problems/44659/3 "2016-05-23T08:04:53Z")

</div>


