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
OOM - JavaScript heap out of memory when trying to create resources #11476
Comments
@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! |
That's quite a lot changed all at once. Can you make one change at a time and repro which part of that overall change actually causes the OOM errors to start? |
As I mentioned before, this issue appeared with Common JS, Node JS v16.17.1 and the old Typescript version. Here is a branch from my repository with CJS instead of ESM, the old Node JS version, but the latest Pulumi - https://github.com/vtereshyn/pulumi-fw-issue/tree/node_16.17.1-cjs |
Here is last working version – https://github.com/vtereshyn/pulumi-fw-issue/tree/last_working_version
|
Checking that out seems to run, but if I update it to:
It still seems to work fine. I suspect this is that pulumi isn't handling esm modules correctly, but I don't think it's ever done that afaik. |
Have you checked my repository or tried on yours? We have other stacks that are working fine. But the stack with Azure Firewall breaks other stacks that have dependency on it. In that stack we have OOM @Frassle |
I checked out your repo at the last_working_version branch and ran a pulumi preview. |
Sounds good. But upgrading dependencies (not CJS to ESM and Typescript version) will break UPD: just checked: updated pulumi dependencies in |
As above I can run
Are you saying that if you update last_working_version to those versions (with no other changes) that it starts OOMing on preview? |
@Frassle yes, exactly when you changed version to make it "clean" please remove |
Right ok, I'll do some more checks haven't used pnpm before might of missed something with that. |
@Frassle does it mean that ESM support is available after 3.21.0, but all past versions are broken and won't work with |
It does look that way, 3.21.1 added es module support but 3.21.0 broke parents (specifically it consumes huge amounts of memory as it tries to calculate the cartesian product of all aliases up the parent chain, and azure-native resources have a lot of type aliases) |
@Frassle is there a way to prioritize the PR you mentioned? Looks like it is a huge thing, but it hasn't been fixed for about 27 minor versions (from 3.21.0 to 3.48.0) |
CC @kpitzen as his been working on it. |
Just to give an update here, @kpitzen landed a fix for alias explosion (linked issue: #11062) in NodeJS. @vtereshyn can you upgrade to v3.44.3 or newer and give that a try? I think we'll be able to close this issue. |
@RobbieMcKinstry I used v3.48.0 as described in the issue. I can upgrade to the latest one and test it one more time. UPD: yes, looks like it has been resolved in one of the latest versions. Here is my
|
🎉 🎉 🎉 I'm very happy this issue has been resolved! I'm sorry this experience was so frustrating. This was a gnarly bug, and it took a lot of mental effort from @kpitzen to fix. In fact, the work to repair this bug in other languages is still ongoing (the fixes for Go, Python, and Java are all landing in the next few weeks thanks to @Zaid-Ajaj). |
What happened?
We use
pulumi
andpulumi/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 ranpulumi preview
orpulumi 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
pulumi up
orpulumi preview
(Repository contains
README.md
file with instructions)Expected Behavior
Pulumi should create resources without OOM
Actual Behavior
Getting OOM error:
Output of
pulumi about
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).
The text was updated successfully, but these errors were encountered: