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

"JavaScript heap out of memory" in the build process #978

Closed
MomentQYC opened this issue Mar 31, 2023 · 3 comments
Closed

"JavaScript heap out of memory" in the build process #978

MomentQYC opened this issue Mar 31, 2023 · 3 comments
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Comments

@MomentQYC
Copy link
Contributor

Steps to reproduce

  1. run yarn and yarn build
  2. The error occurs and the process is interrupted.

Outcome

What did you expect?

Successfully build

What happened instead?

<--- Last few GCs --->

[1995771:0x66ed170]    96045 ms: Scavenge (reduce) 2042.8 (2081.6) -> 2042.6 (2082.3) MB, 14.8 / 0.0 ms  (average mu = 0.475, current mu = 0.384) allocation failure; 
[1995771:0x66ed170]    98419 ms: Mark-sweep (reduce) 2043.6 (2082.3) -> 2043.2 (2082.8) MB, 2372.4 / 0.0 ms  (average mu = 0.270, current mu = 0.019) allocation failure; scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb7b3f0 node::Abort() [node]
 2: 0xa8c89a  [node]
 3: 0xd631b0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xd63557 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xf40c55  [node]
 6: 0xf5313d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xf2d83e v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xf2ec07 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 9: 0xf0fdda v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x12d36cf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x1700579  [node]
Aborted

Node.js v18.14.2
This problem is recent and there was no problem before.

Operating system

Ubuntu 20.04

Browser information

No response

URL for webapp

No response

Will you send logs?

No

@MomentQYC MomentQYC added the T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems label Mar 31, 2023
@MomentQYC
Copy link
Contributor Author

The error message above is actually from running npx vite build

@dbkr
Copy link
Member

dbkr commented Apr 3, 2023

d53be69 fixes this on the github actions workflow, but this can still be a problem in general.

vitejs/vite#2433 to link to the parent bug in Vite.

@dbkr dbkr added T-Task Refactoring, enabling or disabling functionality, other engineering tasks and removed T-Defect Something isn't working: bugs, crashes, hangs, vulnerabilities, or other reported problems labels Apr 3, 2023
@MomentQYC
Copy link
Contributor Author

d53be69 fixes this on the github actions workflow, but this can still be a problem in general.

vitejs/vite#2433 to link to the parent bug in Vite.

There is a very high probability that this issue will be triggered during the user's own build process, so I think it is necessary to modify the package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants