Cannot allocate memory during upgrade


(flyabroad) #1

When update v1.3.0.beta5 +13 1.3.0.beta5, get the following error, What do I need to do to get this update working?

Update Failure :

Uncaught TypeError: Cannot read property ‘relative_date_duration’ of undefined
Url: http://bbs.fcgvisa.com/assets/application-f4b1686c75ebb139ba0f192410ea4280.js?j24a75=s62o52n31
Line: 10
Column: 69
Window Location: http://bbs.fcgvisa.com/


Create a swapfile for your Linux server
(Jeff Atwood) #2

Are you seeing this in /logs? Can you screenshot what you are talking about?


(flyabroad) #3

this is the logs screenshot.


(Jeff Atwood) #4

Do you have any non default plugins installed?


(flyabroad) #5

e, maybe?

Spoiler Alert! 	0.1 ?
discourse-tagging 	0.1
docker_manager 	0.1
lazyYT 	1.0.1
poll 	0.2

(Jeff Atwood) #6

Hmm, no, those all look official and supported. Are you just reporting a random error in the logs, or is this preventing something from happening on your site?


(Kane York) #7

What’s the user-agent? (env tab)


(flyabroad) #8

Try again, not that error.

Say Sorry,

but updated:


(Jeff Atwood) #9

Out of memory. Upgrade from command line or get more memory.


(Clay Heaton) #10

FYI, I just had this happen on a brand new 2GB DO droplet, vanilla install (with the Let’s Encrypt template), no plugins, mostly default settings, only 3-4 topics.


(Jeff Atwood) #11

Set up swap if you want to avoid this in the future. It should be very rare with 2gb ram though.


(Clay Heaton) #12

Thanks. I just wanted to make you aware in case something changed or Let’s Encrypt upped the requirements.


(Jeff Atwood) #13

Not sure, what do you think @tgxworld?


(Sam Saffron) #14

SUPER unlikely this is anything let’s encrypt related. Most like memory usage during asset compilation which can be quite heavy.


(Dylan Hunt) #15

I am having this issue too.

gzip /var/www/discourse/public/assets/docker-manager-app-fc45ae9f5dc46a536ad03487a4ce173f.js
Bundling assets
Compressing Javascript and Generating Source Maps
rake aborted!
**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 also have a 2GB droplet that’s barely used - I even tried rebooting to flush the lost memory.

Any resolution to this? There’s no way this takes more than 2GB … I prefer not to upgrade by cmdline since I’m going to assume I’ll have to do this every time. What is a solution?


(Jeff Atwood) #16

You will need to add a swap file. Rebuilding has a lot of memory pressure and it must have increased in newer versions.