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

azd up not working >> FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory #959

Open
alsiesta opened this issue Jun 24, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@alsiesta
Copy link

Describe the bug
I want to run azd up and tried in container locally and in codespace.

To Reproduce
Steps to reproduce the behavior:

  1. After azd auth login >> Run azd up
  2. See error

tsc && node build

|=======| Packaging service backendvite v4.1.5 building for production...
✓ 2622 modules transformed.
|===== | Packaging service backend
<--- Last few GCs --->

[13808:0x67fd1b0] 70768 ms: Mark-sweep 4043.2 (4141.1) -> 4042.0 (4141.1) MB, 4055.1 / 0.0 ms (average mu = 0.407, current mu = 0.040) allocation failure scavenge might not succeed
[13808:0x67fd1b0] 75875 ms: Mark-sweep 4057.7 (4141.1) -> 4056.6 (4170.8) MB, 5088.5 / 0.0 ms (average mu = 0.206, current mu = 0.004) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xb090e0 node::Abort() [node]
2: 0xa1b70e [node]
3: 0xce1a20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xce1dc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xe99435 [node]
6: 0xea90fd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
7: 0xeabdfe v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0xe6d33a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
9: 0x11e61e6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15d9e59 [node]
|=======| Packaging service backendAborted (core dumped)
(x) Failed: Packaging service backend

ERROR: error executing step command 'package --all': failed packaging service 'backend': failed invoking event handlers for 'prepackage', 'prepackage' hook failed with exit code: '134', Path: '/tmp/azd-prepackage-3812507412.sh'. : exit code: 134

Expected behavior
The build process should finish

@alsiesta alsiesta added the bug Something isn't working label Jun 24, 2024
@karltb-SAM
Copy link

karltb-SAM commented Jun 24, 2024

Hello!

I have also faced the same issue. I've ran $ export NODE_OPTIONS="--max-old-space-size=8192", as is shown in the README.
This, however, just leads to the program running out of memory later in the process. Although, it maybe could work for you?

@alsiesta
Copy link
Author

I also tried to increase the memory with set NODE_OPTIONS=--max-old-space-size=8192 but it didn't help

@abhahn abhahn self-assigned this Jun 26, 2024
@jordanbean-msft
Copy link

I also tried to increase the memory with set NODE_OPTIONS=--max-old-space-size=8192 but it didn't help

I was able to get it to compile by setting this option on my machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants