Skip to content

Commit

Permalink
chore: increase vm.max_map_count to (hopefully) mitigate OOM errors (a…
Browse files Browse the repository at this point in the history
…ws#16752)

The vm.max_map_count on our CodeBuild instances is fairly low (65530) compared
to our max threads (1125977). Based on a NodeJS issue troubleshooting thread
(nodejs/help#2809), trying to see if increasing this
value stabilizes our builds.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
njlynch authored and TikiTDO committed Feb 21, 2022
1 parent f96af0e commit e397481
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildspec-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ phases:

# Install yarn if it wasn't already present in the image
- yarn --version || npm -g install yarn

# Packing the mono-libraries (monocdk & aws-cdk-lib) can cause
# memory errors. Increasing this value allows our build to more consistently succeed
- (command -v sysctl || yum install -y procps-ng) && /sbin/sysctl -w vm.max_map_count=2251954
build:
commands:
- /bin/bash ./build.sh --extract
Expand Down
4 changes: 4 additions & 0 deletions buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ phases:

# Install yarn if it wasn't already present in the image
- yarn --version || npm -g install yarn

# Packing the mono-libraries (monocdk & aws-cdk-lib) can cause
# memory errors. Increasing this value allows our build to more consistently succeed
- /sbin/sysctl -w vm.max_map_count=2251954
build:
commands:
- 'if ${BUMP_CANDIDATE:-false}; then /bin/bash ./scripts/bump-candidate.sh; fi'
Expand Down

0 comments on commit e397481

Please sign in to comment.