2

I have a react project, about 40MB. I run 'npm run build' with the param --max-old-space-size=4096.

At my local, about 8GB RAM, the build is running fine. But on Jenkins (AWS EC2 hosted one, t2.medium) 4GB, either 'Out Of Memory' or crash EC2 instance.

Please advice if any way we can overcome on Jenkins 4GB RAM.

Thanks,

Nghia Do
  • 2,588
  • 2
  • 17
  • 31

2 Answers2

1

You should also check if there aren't any other apps eating out the memory on that EC2 instance. Because the react build itself, consuming 4 GB of memory, in a small project, is much unlikely to happen!

This thread might help you: How to monitor EC2 instances by memory?

Todor Popov
  • 181
  • 7
0

You need an instance with more memory, it's as simple as that. A t2.medium has 4GB total memory, but of course the system needs some of it for other processes also.

ruohola
  • 21,987
  • 6
  • 62
  • 97