Skip to content

Build fails, memory flag has no effect #292

@vdo

Description

@vdo

Trying to build a node app returns out of memory error:

=> CACHED [linux/arm/v7 build-deps-adminui 10/11] RUN ./getVersionData.sh                                                                                                                0.0s
 => ERROR [linux/arm/v7 build-deps-adminui 11/11] RUN yarn run build                                                                                                                   1640.8s
------
 > [linux/arm/v7 build-deps-adminui 11/11] RUN yarn run build:
#22 2.147 yarn run v1.13.0
#22 2.879 $ react-scripts build
#22 17.37 Creating an optimized production build...
#22 30.15 Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
#22 1639. 
#22 1639. <--- Last few GCs --->
#22 1639. 
#22 1639. [62:0x1b4c910]  1631887 ms: Scavenge 676.2 (719.2) -> 675.5 (720.2) MB, 13.3 / 0.0 ms  (average mu = 0.248, current mu = 0.200) allocation failure 
#22 1639. [62:0x1b4c910]  1631919 ms: Scavenge 676.3 (720.2) -> 675.7 (720.7) MB, 13.8 / 0.0 ms  (average mu = 0.248, current mu = 0.200) allocation failure 
#22 1639. [62:0x1b4c910]  1631960 ms: Scavenge 676.5 (720.7) -> 675.8 (721.2) MB, 14.0 / 0.0 ms  (average mu = 0.248, current mu = 0.200) allocation failure 
#22 1639. 
#22 1639. 
#22 1639. <--- JS stacktrace --->
#22 1639. 
#22 1639. ==== JS stack trace =========================================
#22 1639. 
#22 1639.     0: ExitFrame [pc: 0x49d6ae9c]
#22 1639.     1: StubFrame [pc: 0x49d27a54]
#22 1639. Security context: 0x5dd92705 <JSObject>
#22 1639.     2: /* anonymous */(aka /* anonymous */) [0x3a641941] [/usr/src/app/node_modules/webpack-sources/lib/applySourceMap.js:~58] [pc=0x1e00946c](this=0x51f0438d <undefined>,chunk=0x23e66ef1 <String[4]: var >,middleMapping=0x3f631101 <Object map = 0x289db6dd>)
#22 1639.     3: walk(aka SourceNode_walk) [0x3d6c0ed9] [/usr/src/app/node_modules/sou...
#22 1639. 
#22 1639. FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
#22 1640. qemu: uncaught target signal 6 (Aborted) - core dumped
#22 1641. error Command failed with exit code 1.
#22 1641. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c yarn run build]: buildkit-runc did not terminate successfully

Looks like build accepts memory flag, but has no effect:

docker buildx build --memory="2g" --platform linux/arm,linux/arm64,linux/amd64 -t admin.dnp.dappnode.eth .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions