Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat(redis): add memory calcualtion when not running on fly
Gergő Móricz075b63b57b52
diff --git a/apps/redis/start-redis-server.sh b/apps/redis/start-redis-server.shindex 30e4a145f..45b92a954 100755--- a/apps/redis/start-redis-server.sh+++ b/apps/redis/start-redis-server.sh@@ -10,14 +10,13 @@ if [[ ! -z "${REDIS_PASSWORD}" ]]; thenPW_ARG="--requirepass $REDIS_PASSWORD"fi-# Set maxmemory-policy to 'allkeys-lru' for caching servers that should always evict old keys-: ${MAXMEMORY_POLICY:="volatile-lru"}+: ${MAXMEMORY_POLICY:="noeviction"}: ${APPENDONLY:="no"}-: ${FLY_VM_MEMORY_MB:=512}+: ${FLY_VM_MEMORY_MB:=$(($(grep MemTotal /proc/meminfo | awk '{print $2}') / 1024))}if [ "${NOSAVE}" = "" ] ; then: ${SAVE:="3600 1 300 100 60 10000"}fi-# Set maxmemory to 10% of available memory+# Set maxmemory to 80% of RAMMAXMEMORY=$(($FLY_VM_MEMORY_MB*80/100))mkdir /data/redis