Add suggestion for low memory VMs
This commit is contained in:
@@ -29,3 +29,23 @@ As well, you may wish to customize your installation in some other fashion. or e
|
||||
- [Debian Package Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation)
|
||||
|
||||
### VMs with less than 512mb memory
|
||||
Having less than 512mb of system-memory available for dokku and its containers, for example Digital Ocean's smallest machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867).
|
||||
|
||||
To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size.
|
||||
|
||||
To resize the swap file of a 512MB machine to 1GB, follow these steps while in SSH within your machine:
|
||||
```
|
||||
root@my.droplet:/# cd /var
|
||||
root@my.droplet:/# touch swap.img
|
||||
root@my.droplet:/# chmod 600 swap.img
|
||||
|
||||
root@my.droplet:/# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
|
||||
root@my.droplet:/# mkswap /var/swap.img
|
||||
root@my.droplet:/# swapon /var/swap.img
|
||||
root@my.droplet:/# free
|
||||
|
||||
root@my.droplet:/# echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
|
||||
```
|
||||
Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps
|
||||
|
||||
Reference in New Issue
Block a user