From f4539d062e9667a2695569ab7ef5b6d5d85a7d37 Mon Sep 17 00:00:00 2001 From: Cayman Date: Tue, 23 Jan 2024 10:30:44 -0500 Subject: [PATCH] fix: update max-old-space-size to 8192 --- Dockerfile | 5 ++--- docker-compose.yml | 5 ++--- docs/pages/tools/flamegraphs.md | 2 +- lodestar | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a9541e06f1a..55531a99b74f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,8 +40,7 @@ WORKDIR /usr/app COPY --from=build_deps /usr/app . # NodeJS applications have a default memory limit of 2.5GB. -# This limit is bit tight for a Prater node, it is recommended to raise the limit -# since memory may spike during certain network conditions. -ENV NODE_OPTIONS=--max-old-space-size=4096 +# This limit is too low for a Holesky node, it is required to raise the limit +ENV NODE_OPTIONS=--max-old-space-size=8192 ENTRYPOINT ["node", "./packages/cli/bin/lodestar"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index cab1245d351e..d6cba90d4cff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,10 +12,9 @@ services: # - "9596:9596" # REST API port command: beacon --dataDir /data --rest --rest.address 0.0.0.0 --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 # NodeJS applications have a default memory limit of 2.5GB. - # This limit is bit tight for a Prater node, it is recommended to raise the limit - # since memory may spike during certain network conditions. + # This limit is too low for a Holesky node, it is required to raise the limit environment: - NODE_OPTIONS: --max-old-space-size=4096 + NODE_OPTIONS: --max-old-space-size=8192 prometheus: build: docker/prometheus diff --git a/docs/pages/tools/flamegraphs.md b/docs/pages/tools/flamegraphs.md index d6f45303a9aa..119cc7dc10e5 100644 --- a/docs/pages/tools/flamegraphs.md +++ b/docs/pages/tools/flamegraphs.md @@ -18,7 +18,7 @@ Next we need to update the Lodestar service by modifying the start script. We ne ```sh node \ --perf-basic-prof \ - --max-old-space-size=4096 \ + --max-old-space-size=8192 \ /usr/src/lodestar/packages/cli/bin/lodestar \ beacon \ --rcConfig /home/devops/beacon/rcconfig.yml diff --git a/lodestar b/lodestar index 2101d94b77cb..f67e4b73330c 100755 --- a/lodestar +++ b/lodestar @@ -2,6 +2,6 @@ # Convenience script to run the lodestar binary from built source # -# ./lodestar.sh beacon --network prater +# ./lodestar.sh beacon --network holesky -node --trace-deprecation --max-old-space-size=4096 ./packages/cli/bin/lodestar.js "$@" \ No newline at end of file +node --trace-deprecation --max-old-space-size=8192 ./packages/cli/bin/lodestar.js "$@" \ No newline at end of file