Skip to content

Cannot Build openvscode-server – OOM (Out of Memory) #618

@RizwanaVyoma

Description

@RizwanaVyoma

I am trying to build OpenVSCode Server inside GitHub Codespaces, but the build process fails with an Out of Memory (OOM) error when running the vscode-reh-web-linux-x64-min task.

Started Gitpod Codespace Node.js version was v20.19.4, but .nvmrc specifies v22.15.1.
So changed Node to 22.15.1.

Was able to run the npm install, compile, and npm run gulp commands

But not able to build the application
yarn gulp vscode-reh-web-linux-x64-min

gives the OOM error

Tired increasing--max-old-space-size value with 12288, 24000 , 32768 and 45056 but getting same issue
"gulp": "node --max-old-space-size=45056 ./node_modules/gulp/bin/gulp.js",

Also tried setting --optimize-for-size, but no luck.

Please let us know how to fix this issue.

Below are the logs
node --max-old-space-size=45056 ./node_modules/gulp/bin/gulp.js vscode-reh-web-linux-x64-min
[06:10:42] Using gulpfile /workspace/openvscode-server/gulpfile.js
[06:10:42] Starting 'vscode-reh-web-linux-x64-min'...
[06:10:42] Starting clean-out-build ...
[06:10:42] Finished clean-out-build after 24 ms
[06:10:42] Starting build-date-file ...
[06:10:42] Finished build-date-file after 1 ms
[06:10:42] Starting compile-api-proposal-names ...
[06:10:42] Starting compilation api-proposal-names...
(node:22673) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ... to show where the warning was created)
[06:10:42] Finished compilation api-proposal-names with 0 errors after 173 ms
[06:10:42] Finished compile-api-proposal-names after 188 ms
[06:10:42] Starting compile-src ...
[06:11:03] [mangler] Done collecting. Classes: 9090. Exported symbols: 11121
[06:11:05] [mangler] Done creating class replacements
[06:11:05] [mangler] Starting prepare rename edits
[06:11:06] Starting compilation...

<--- Last few GCs --->

[22673:0x7fcfc0001000] 982327 ms: Scavenge (reduce) (interleaved) 3446.4 (3518.8) -> 3445.8 (3519.1) MB, pooled: 0 MB, 23.71 / 0.00 ms (average mu = 0.770, current mu = 0.760) allocation failure;
[22673:0x7fcfc0001000] 982467 ms: Scavenge (reduce) (interleaved) 3446.7 (3519.1) -> 3446.0 (3519.6) MB, pooled: 0 MB, 45.30 / 0.00 ms (average mu = 0.770, current mu = 0.760) allocation failure;

<--- JS stacktrace --->

FATAL ERROR: Committing semi space failed. Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0xe09a56 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [gulp vscode-reh-web-linux-x64-min]
2: 0x11ba160 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [gulp vscode-reh-web-linux-x64-min]
3: 0x11ba437 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [gulp vscode-reh-web-linux-x64-min]
4: 0x13e7e65 [gulp vscode-reh-web-linux-x64-min]
5: 0x145544e [gulp vscode-reh-web-linux-x64-min]
6: 0x13ff130 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [gulp vscode-reh-web-linux-x64-min]
7: 0x1400ca9 [gulp vscode-reh-web-linux-x64-min]
8: 0x1404138 [gulp vscode-reh-web-linux-x64-min]
9: 0x1c69e01 [gulp vscode-reh-web-linux-x64-min]
Aborted
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions