pulumi: OOM - JavaScript heap out of memory when trying to create resources
What happened?
We use pulumi and pulumi/azure-native to create Frontdoor resources. After upgrading to the latest Typescript, Pulumi, and Node JS versions and moving project to the EcmaScript modules, we started getting OOM whenever we ran pulumi preview or pulumi up
Not sure if the issue is in @pulumi/azure-native or @pulumi/pulumi package, but this is a huge blocker for us. We can’t proceed with other stacks because they have references to this stack which is broken.
Please note I tried to do the same with Common JS instead of ESM, old Typescript, and Node JS versions, but the issue is still present.
Steps to reproduce
- Clone repository (https://github.com/vtereshyn/pulumi-fw-issue)
- install dependencies
- build Typescript
- create a new stack
- run
pulumi uporpulumi preview
(Repository contains README.md file with instructions)
Expected Behavior
Pulumi should create resources without OOM
Actual Behavior
Getting OOM error:
<--- Last few GCs --->
[84542:0x7fe6c8078000] 336061 ms: Scavenge (reduce) 16096.1 (16429.9) -> 16095.9 (16430.9) MB, 36.1 / 0.0 ms (average mu = 0.105, current mu = 0.014) allocation failure;
[84542:0x7fe6c8078000] 354901 ms: Mark-sweep (reduce) 16096.9 (16430.9) -> 16096.5 (16431.4) MB, 18766.4 / 0.0 ms (+ 203.0 ms in 45 steps since start of marking, biggest step 6.4 ms, walltime since start of marking 19127 ms) (average mu = 0.060, curren
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Output of pulumi about
CLI
Version 3.48.0
Go Version go1.19.3
Go Compiler gc
Plugins
NAME VERSION
azure-native 1.87.0
azure-native 1.87.0
nodejs unknown
Host
OS darwin
Version 12.6.1
Arch x86_64
This project is written in nodejs: executable='/Users/.nvm/versions/node/v18.12.0/bin/node' version='v18.12.0'
Current Stack: org/test
Found no resources associated with org/test
Found no pending operations associated with org/test
Additional context
Link to repository: https://github.com/vtereshyn/pulumi-fw-issue
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already).
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 9
- Comments: 19 (10 by maintainers)
Right ok, I’ll do some more checks haven’t used pnpm before might of missed something with that.
@mikhailshilkov any suggestions here, we are kind of blocked due to it 😦 if you need more info happy to provide it here or over Slack. Thanks!