日. 6月 26th, 2022

はじめに

redash v8 のリポジトリを clone して コンテナを build しようとすると、

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

というエラーになった。

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

Writing Node.js report to file: report.20200305.111353.33.0.001.json
Node.js report completed
 1: 0x9dab70 node::Abort() [node]
 2: 0x9dbd26 node::OnFatalError(char const*, char const*) [node]
 3: 0xb3b18e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb3b509 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xce68a5  [node]
 6: 0xce6f36 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xcf2dca v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xcf3cd5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xcf66e8 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
10: 0xcbd017 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node]
11: 0xff307b v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x1376259  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! redash-client@9.0.0-alpha build: `npm run clean && NODE_ENV=production webpack`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the redash-client@9.0.0-alpha build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
ERROR: Service 'server' failed to build: The command '/bin/sh -c npm run build' returned a non-zero code: 134

原因

マシンのメモリーが足りない。

https://redash.io/help/open-source/dev-guide/docker

v8 のイメージをbuild するには最低限 4G のメモリーが必須となるようだ。

ビルドするマシンのメモリーを増やすことによって解決できた。