Make build runs out of memory

I built a plone 6 (volto 17.13.0) site using the Create a Project docs. The backend builds fine but when I make build in the frontend end the 4GB AWS Lightsail instance runs out of memory when it gets to Compiling server default build.... I ran make clean and then make build again but got the same result.

I also tried using the node option --max-old-space-size=3500 but then the it simply fails when it get to that limit.

Any ideas?

We set it to 8Gigs :slight_smile: eea-website-frontend/Dockerfile at db7f26bac9f6b1e446345834c1b52a067630d3bc · eea/eea-website-frontend · GitHub

Hi @nileshgulia1. Is that on a machine with 4GB RAM?

I had this on our orchestration with 8GB of RAM. Also works on my laptop locally which is having 16gigs.

@mikemets this is a known issue. You can get around it by using a swapfile:

Thanks @pigeonflight, I missed that one

No prob. I hope it works!

It does, thanks.

1 Like

If you build container images, also check the max memory available to the docker engine on the system. I had this set to 2Gb on a server and then the dockerfile building can also run out of memory. Esp. On the yarn build.

1 Like