Skip to content

Commit 971efc6

Browse files
committed
Add swapfile to avoid Errno::ENOMEM: Cannot allocate memory - fork(2)
1 parent 1e0188d commit 971efc6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bootstrap.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ function install {
66
apt-get -y install "$@" >/dev/null 2>&1
77
}
88

9+
echo adding swap file
10+
fallocate -l 2G /swapfile
11+
chmod 600 /swapfile
12+
mkswap /swapfile
13+
swapon /swapfile
14+
echo '/swapfile none swap defaults 0 0' >> /etc/fstab
15+
916
echo updating package information
1017
apt-add-repository -y ppa:brightbox/ruby-ng >/dev/null 2>&1
1118
apt-get -y update >/dev/null 2>&1

0 commit comments

Comments
 (0)