AWS EC2 : Ubuntu Webserver - Process out of memory when running npm install
<p>I have been running an instance on AWS EC2 (Ubuntu Webserver) just fine for last couple of weeks. Recently, I tried to update my application and thus tried to install all <code>npm packages</code> again and restart my application.</p>

<p>However, I am running into out of memory problem whenever I run <code>npm install</code></p>

<p>I have killed all <code>screen</code> process and also tried <code>killall node</code></p>

<p>Is there any command I can use to free up some memory space for my EC2 instance?</p>

<p>Following is the error I am receiving when running <code>npm install</code></p>

<p><a href="https://i.stack.imgur.com/aF2G0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aF2G0.png" alt="enter image description here"></a></p>

<p>I am using 2 disk volumes for my ES2 instances (8GB each). The first disk space holds the OS and second one holds my actual application.</p>

<p><a href="https://i.stack.imgur.com/eRrBq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eRrBq.png" alt="enter image description here"></a></p>