Redis running on 64k pagesize (#12264)
This commit is contained in:
parent
92cf99f025
commit
c210857791
|
|
@ -27,7 +27,7 @@ RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | apt-key add -
|
||||||
RUN echo "deb [ arch=amd64,arm64 ]http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
|
RUN echo "deb [ arch=amd64,arm64 ]http://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.4.list \
|
||||||
&& apt-get remove wget -y
|
&& apt-get remove wget -y
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
||||||
&& apt-get -y install --no-install-recommends -y mongodb-org=4.4.6 nodejs redis \
|
&& apt-get -y install --no-install-recommends -y mongodb-org=4.4.6 nodejs redis build-essential \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,6 +194,26 @@ configure_supervisord() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# This is a workaround to get Redis working on diffent memory pagesize
|
||||||
|
# https://github.com/appsmithorg/appsmith/issues/11773
|
||||||
|
check_redis_compatible_page_size() {
|
||||||
|
local page_size
|
||||||
|
page_size="$(getconf PAGE_SIZE)"
|
||||||
|
if [[ $page_size -gt 4096 ]]; then
|
||||||
|
echo "Compile Redis stable with page size of $page_size"
|
||||||
|
echo "Downloading Redis source..."
|
||||||
|
curl https://download.redis.io/redis-stable.tar.gz -L | tar xvz
|
||||||
|
cd redis-stable/
|
||||||
|
echo "Compiling Redis from source..."
|
||||||
|
make && make install
|
||||||
|
echo "Cleaning up Redis source..."
|
||||||
|
cd ..
|
||||||
|
rm -rf redis-stable/
|
||||||
|
else
|
||||||
|
echo "Redis is compatible with page size of $page_size"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Main Section
|
# Main Section
|
||||||
init_env_file
|
init_env_file
|
||||||
unset_unused_variables
|
unset_unused_variables
|
||||||
|
|
@ -204,6 +224,7 @@ if [[ -z "${DYNO}" ]]; then
|
||||||
init_replica_set
|
init_replica_set
|
||||||
fi
|
fi
|
||||||
mount_letsencrypt_directory
|
mount_letsencrypt_directory
|
||||||
|
check_redis_compatible_page_size
|
||||||
# These functions are used to limit heap size for Backend process when deployed on Heroku
|
# These functions are used to limit heap size for Backend process when deployed on Heroku
|
||||||
get_maximum_heap
|
get_maximum_heap
|
||||||
setup_backend_heap_arg
|
setup_backend_heap_arg
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user