install: Reduce the RAM limit to accommodate some definition of "2GB".

See also the discussion at
https://chat.zulip.org/#narrow/stream/3-backend/topic/2GB.20ram.20gotcha.
This commit is contained in:
rht
2020-01-24 15:22:18 -05:00
committed by Tim Abbott
parent b23a5431cd
commit 7c9954afc6

View File

@@ -141,11 +141,13 @@ EOF
exit 1
fi
# Check for at least ~1.9GB of RAM before starting installation;
# Check for at least ~1.86GB of RAM before starting installation;
# otherwise users will find out about insufficient RAM via weird
# errors like a segfault running `pip install`.
# Additionally, some AWS images that are advertised to be 2 GB
# are actually 1880000B in size.
mem_kb=$(head -n1 /proc/meminfo | awk '{print $2}')
if [ "$mem_kb" -lt 1900000 ]; then
if [ "$mem_kb" -lt 1860000 ]; then
set +x
echo -e '\033[0;31m' >&2
echo "Insufficient RAM. Zulip requires at least 2GB of RAM." >&2