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

improve build:ssr by passing max_old_space_size to ng run command #44

Closed

Conversation

saschaszott
Copy link

This PR extends the heap space adjustment in build:ssr to the second ng run comannd.

We have seen reproducable out-of-memory error when building the Docker image. The error occurs after the successful completion of the first command in build:ssr (which is already adjusted in terms of available heap space).

Output when running docker build:

251.9 - Generating server application bundles (phase: setup)...
409.6 ✔ Server application bundle generation complete.
421.3
421.3 <--- Last few GCs --->
421.3
421.3 [38:0xffff94cae330]   171120 ms: Mark-sweep (reduce) 1982.9 (2076.8) -> 1982.9 (2075.8) MB, 707.9 / 0.0 ms  (average mu = 0.227, current mu = 0.000) allocation failure; GC in old space requested
421.3 [38:0xffff94cae330]   171706 ms: Mark-sweep (reduce) 1986.2 (2078.5) -> 1983.2 (2078.5) MB, 477.8 / 0.0 ms  (average mu = 0.211, current mu = 0.185) allocation failure; GC in old space requested
421.3
421.3
421.3 <--- JS stacktrace --->
421.3
421.3 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
421.7 error Command failed with signal "SIGABRT".
421.7 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
422.0 error Command failed with exit code 1.
422.0 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
failed to solve: process "/bin/sh -c yarn build:prod" did not complete successfully: exit code: 1

@floriangantner
Copy link

has been meanwhile fixed in https://github.com/4Science/dspace-angular/blob/dspace-cris-2023_02_x/package.json#L21C36-L21C110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants