Skip to content

Commit

Permalink
[Website] Increase the memory limit for the build (apache#9930)
Browse files Browse the repository at this point in the history
---

*Motivation*

The website builds always failed by OOM.

```
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->

[3385:0x284bf60]    70277 ms: Mark-sweep 1373.5 (1423.3) > 1372.6 (1423.3) MB, 2874.4 / 0.0 ms  (average mu = 0.140, current mu = 0.040) allocation failure scavenge might not succeed
[3385:0x284bf60]    73197 ms: Mark-sweep 1373.8 (1423.3) > 1372.8 (1423.3) MB, 2917.9 / 0.0 ms  (average mu = 0.074, current mu = 0.001) allocation failure scavenge might not succeed

<--- JS stacktrace --->

==== JS stack trace =========================================

0: ExitFrame [pc: 0x257b9fdbf1d]
Security context: 0x1427fb09e6c1 <JSObject>
1: getArg [0x2df6a830c771] [/pulsar/site2/website/node_modules/@babel/generator/node_modules/source-map/lib/util.js:~18] [pc=0x257ba453330](this=0x2df6a830a5a1 <Object map = 0x2fd37e5b64f9>,aArgs=0x20026ec39139 <Object map = 0x2fd37e5f5bb9>,aName=0x072e64624f69 <String[9]: generated>,aDefaultValue=0x20394b3026f1 <undefined>)
2: arguments adaptor frame...

1: 0x8fb090 node::Abort() [/usr/bin/node]
2: 0x8fb0dc  [/usr/bin/node]
3: 0xb033be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
4: 0xb035f4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/bin/node]
5: 0xef7652  [/usr/bin/node]
6: 0xef7758 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/bin/node]
7: 0xf03832 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/bin/node]
8: 0xf04164 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/bin/node]
9: 0xf06dd1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/bin/node]
10: 0xed0254 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/usr/bin/node]
11: 0x117032e v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/bin/node]
12: 0x257b9fdbf1d
Aborted (core dumped)
error Command failed with exit code 134--
```

*Modifications*

- Increase the memory from 512mb to 2048gb
  • Loading branch information
zymap authored Mar 17, 2021
1 parent 48e23ff commit 6550a90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion site2/tools/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ VERSION=`${ROOT_DIR}/src/get-project-version.py`

set -x -e

export NODE_OPTIONS="--max-old-space-size=2048" #increase to 2gb, default is 512mb
${ROOT_DIR}/site2/tools/generate-api-docs.sh
cd ${ROOT_DIR}/site2/website
yarn
Expand Down Expand Up @@ -76,4 +77,4 @@ mkdir -p ${ROOT_DIR}/generated-site/content
cp -R ${ROOT_DIR}/generated-site/api ${ROOT_DIR}/generated-site/content
cp -R ./build/pulsar/* ${ROOT_DIR}/generated-site/content
cp -R ${ROOT_DIR}/generated-site/tools ${ROOT_DIR}/generated-site/content
cp -R ${ROOT_DIR}/site2/website/static/swagger/* ${ROOT_DIR}/generated-site/content/swagger/
cp -R ${ROOT_DIR}/site2/website/static/swagger/* ${ROOT_DIR}/generated-site/content/swagger/

0 comments on commit 6550a90

Please sign in to comment.