Skip to content

Inclusion of node-modules in zip / tar can trigger CodeDeploy memory leak #13

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

Closed
DuncanChud opened this issue Mar 3, 2020 · 2 comments

Comments

@DuncanChud
Copy link

Given that CodeDeploy has a memory leak based on the size of the zip it tries to extract ( aws/aws-codedeploy-agent#32 ) would be good if the zip / tar process excluded the node-modules itself, or an array of supplied directories. If using the NPM version of the install its impossible to not have that be part of the archive itself currently.

I could do a PR for this if seems useful.

@KiamarzFallahi
Copy link

@DuncanChud I know the issue was opened a long time ago, but CodeDeploy is close to releasing a fix for the memory leak. Can you think of another use for the issue above in a world where the memory leak is resolved?

@virgofx
Copy link
Member

virgofx commented May 5, 2020

Just getting around to this now. I believe this is somewhat custom. While we could do this in our script ... it makes more sense to package your directory for deployment as needed just prior to running this script during deploy. Meaning, if your application doesn't need node_modules or vendor make sure you appropriately build and package your distribution directory accordingly.

Then, everything inside AWS_CODE_DEPLOY_APP_SOURCE you have full control over as needed for your application.

@virgofx virgofx closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants