Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update beacon max-old-space-size to 8192 #6343

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ FROM node:20-alpine
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
# NodeJS applications have a default memory limit of 4GB on most machines.
# This limit is bit tight for a Mainnet node, it is recommended to raise the limit
# since memory may spike during certain network conditions.
ENV NODE_OPTIONS=--max-old-space-size=4096
ENV NODE_OPTIONS=--max-old-space-size=8192

ENTRYPOINT ["node", "./packages/cli/bin/lodestar"]
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ services:
- "9000:9000" # P2P port
# - "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
# NodeJS applications have a default memory limit of 4GB on most machines.
# This limit is bit tight for a Mainnet node, it is recommended to raise the limit
# since memory may spike during certain network conditions.
environment:
NODE_OPTIONS: --max-old-space-size=4096
NODE_OPTIONS: --max-old-space-size=8192

prometheus:
build: docker/prometheus
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/tools/flamegraphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lodestar
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# Convenience script to run the lodestar binary from built source
#
# ./lodestar.sh beacon --network prater
# ./lodestar.sh beacon --network mainnet

node --trace-deprecation --max-old-space-size=4096 ./packages/cli/bin/lodestar.js "$@"
node --trace-deprecation --max-old-space-size=8192 ./packages/cli/bin/lodestar.js "$@"
Loading