How much memory is required to build canvas?

101 views
Skip to first unread message

Paul Wray

unread,
Aug 17, 2017, 9:07:50 PM8/17/17
to Canvas LMS Users
Ive been trying to build canvas on Amazon Lightsail. Apparently 4GB is not enough!!

Can anyone say how much memory is enough to do the build?
Why so much? As I increased the memory seems like it got further each time. 
Does the build never release memory or use swap space?

At this point I am doubting that 8GB will be enough

Graham Ballantyne

unread,
Aug 17, 2017, 9:39:38 PM8/17/17
to canvas-l...@googlegroups.com
Hi Paul,

4GB is enough in my experience; I regularly build in 4GB Docker & Vagrant environments. I'm not familiar with Amazon Lightsail; how many CPU cores do you have at your disposal? The compile_assets task is parallelized and will take advantage of as many cores as you can throw at it.

What step is is hanging up on?
--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Graham Ballantyne
IT Services
Simon Fraser University

Paul Wray

unread,
Aug 17, 2017, 10:39:48 PM8/17/17
to Canvas LMS Users, gra...@sfu.ca
I got it to build on an 8G instance.
I have followed the production build instructions but am attempting to run the dev server using 
script/rails server -eproduction

I can log in, but many 404 errors, so I guess there is still some setup to do with file routes I have missed.
The files do seem to be present in public/dist

Graham Ballantyne

unread,
Aug 17, 2017, 11:13:09 PM8/17/17
to Paul Wray, Canvas LMS Users
The dev server isn't really meant to be run in production mode. Did you follow the Production Start guide in the wiki when you set up your instance?

If the 404s are for static assets (CSS/JS) then it sounds like either compile assets didn't work, or you compiled for one environment (e.g. development) but are running in another.

Paul Wray

unread,
Aug 17, 2017, 11:26:58 PM8/17/17
to Canvas LMS Users, pa...@gentaxis.com, gra...@sfu.ca
Thanks. I followed the production start guide, but hoped to use a simple rails server (I just want to play with the Canvas API). 
I guess I shall have to set up Apache.

vn...@yandex.com

unread,
Aug 20, 2017, 12:23:40 PM8/20/17
to Canvas LMS Users
I installed successfully on a 2 gig server about 2 months ago.  Fiddle with the build script, I think it defaults to using 4 cores, so 4 parallel build tasks.  I set it to 2..  Then i added a 2 gig swap file, and let it grind for a while.  Success!  CPU was averaging about 90% so the swap did not cause any bad thrashing.

There was not much more to it than that.  I vaguely recall it took about 30 minutes to finish.

I think had a post here about it..

Adon Irani

unread,
Jan 9, 2018, 11:20:15 PM1/9/18
to Canvas LMS Users
I had never had memory problems compiling Canvas until tonight.
As of this latest update (yarn no longer 0.27 hold) i'm having serious memory issues.

With 4GB and 1GB swap, the server would grind to a halt after a period of time.

As a workaround, i created a really large swap file (10G).
Compile now works but swap maxed out at over 4GB, with all 4GB of actual ram fully allocated.

Beast mode activated!

Adon
Reply all
Reply to author
Forward
0 new messages