package installation gets killed

Posted September 8, 2016 15.3k views
Getting StartedUbuntu 16.04

Hi Team ,

I am trying to install some packages but every time process gets killed . More details are here.

Please help..


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Based on the information you provided, that npm is crashing or killing it’s sub-processes during this install but not at the same point each time the most likely cause is that your droplet is running out of available memory to complete the installation process. This is especially likely if you are running a 512MB droplet.

Droplets do not ship with swap configured by default. This means that if the physical memory available to it is used up it will not buffer memory to the disk, instead processes may be killed.

There are two potential solutions for this issue:

1.) Upgrade to a droplet with more RAM. This will provide the best performing solution for this problem as RAM is much faster than swap.

2.) Create a swap file on your droplet. The installation and other process that have to use the swap space will run slower than they would in physical memory but this should prevent the process from being killed.

by Justin Ellingwood
One of the easiest way of increasing the responsiveness of your server and guarding against out of memory errors in your applications is to add some swap space. In this guide, we will cover how to add a swap file to an Ubuntu 16.04 server. <$>[warning] [label...

Hello all,

I will also recommend adding a swap file. You can check our tutorial on How To Add Swap Space on Ubuntu 20.04

If you’re still having issues you can use tools like top to monitor the processes on your server and see if a service is using way too many resources.


by Justin Ellingwood
Monitoring a server's resources is an important task for every administrator. There are many command line tools made for this purpose. This guide will cover some of the more popular utilities for monitoring your VPS.