Open shide1989 opened 4 years ago
Would also love to see this, would be happy to pay more for larger build instance sizes. In CI our build runs in ~1 minute on a powerful server, in Amplify it runs in ~5 minutes. Being able to customize this would substantially speed up our deploys.
My Cypress tests in some cases are using too much memory when I launch more than one visit
in a test function. I'm really needing more memory to run my tests how I'd like them to run.
It seems like the build environment could be CodeBuild behind the scenes - it would be nice if some of these other instance types were available:
If only. I really hope they will improve on this front soon!
On Thu, May 13, 2021 at 1:43 PM Michael Warkentin @.***> wrote:
It seems like the build environment could be CodeBuild behind the scenes - it would be nice if some of these other instance types were available:
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/aws-amplify/amplify-console/issues/654#issuecomment-840720028, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDPO5QGH7QSUZOEGNOLBZTTNQFTJANCNFSM4M3FWF2Q .
@kevcam4891 yes, we'd also be happy to pay more for more CPU (ARM could be really interesting too..) to throw at our big webpack builds.
Yes, would definitely like this feature to be supported. Currently, some of the webpack builds take 10+ minutes, and adding the ability to offload heavier builds to a compute-optimized machine would be really nice.
+1 I suppose the alternative is to eject and manage this elsewhere? Github actions maybe.
+1 my deploy time is 30 minutes
+1 My deployments are failing because it consume all the memory on the machine.
+1 would love to control build instance size to speed up our build times
@mauerbac can you help with this one?
+1 We'd be happy to pay for extra resources to get things built quicker.
+1 We would love to have control in instance type configuration. It takes a minute on my local, but 15mins on the pipeline.
Has there been any official word on this? Our builds now take over 30 minutes.
Same for us. This would be much appreciated ! E2E tests take more than 30 minutes to run on amplify compared to about 15 minutes locally.
At this point I'd settle for paying $$$ just to get a response from AWS.
+1 would love faster deploys
+1 here. What I have done now is not to auto-update amplify CLI to latest version during deploy which is default behavior. This gives us 3 minutes back of build time.
How do you do that?
Yeah we're seeing 40-minute deployment times and it just keeps going up 😭
How do you do that?
Yeah we're seeing 40-minute deployment times and it just keeps going up 😭
Damn... and for that reason we stayed away from using Amplify to manage our backend deployments. We had long debates about to include backend in Amplify or not.. After 1 week of trialing we already entered in to some bumps and we felt this was not mature enough so we used serverless framework and CDK. We only use Amplify for CI/CD our frontend and that is going good 9 out of 10 times.
+1 I got such a error to build java Lambda function with graalVM for native-image. looks memory is not enough.
now I gave up to use useful Amplify CI/CD flow and need to deploy it via Cloud9 manually for backend part.😢
I really hope this improvement.
2022-02-18T08:46:31.696Z [INFO]: Error: Command failed with exit code 1: gradle build
...
Note: Creating bean classes for 1 type elements
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006e9d00000, 1088946176, 0) failed; error='Not enough space' (errno=12)
Error: Image build request failed with exit status 1
Thanks.
We will be prioritizing this feature this year. Stay tuned..
Thank goodness! Hoping at the very least for this to be an update by the next re:invent!!
+1 would love to control build instance size
+1 Any update on this since Mar 2019?
@swaminator, any update on this enhancement and when we might expect it? Is this still a priority?
@swaminator, I am experiencing 100 mins build time, is this feature on cards, my project have gone massive and need to increase the provisions asap!
Here is what I did to fix my issues:
Go to Environment variables and add the following:
Variable: NODE_OPTIONS Value: --max_old_space_size=4096
Variable: DISABLE_ESLINT_PLUGIN Value: true
Once you do that - your build should drop in time and deploy. Now go and enjoy your day.
I should mention our project is a react js project and this may not work for everyone - but the concept might be translatable.
Me waiting for this feature to release 😫💀
Are there any updates on this one?
My amplify build fails with running out of memory. Is there any workaround to increase provisioned memory for the build instance?
I am facing the same issue, i am building a react app and amplify frontend build is giving me this error
The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process
Any recommendation on how to overcome this?
hello guys, for those who are still looking for a workaround. I have created a swap of around 4 GB and it resolved my memory issue. These are the exact commands i added in preBuild phase in my amplify.yml file
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
swapon -s
@imtiazqumar worked perfect for me, but without sudo...
phases:
preBuild:
commands:
- export NODE_OPTIONS=--max-old-space-size=16384
- fallocate -l 4G /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- swapon /swapfile
- swapon -s
Thanks @imtiazqumar @Hernanm0g Great solution! And no significant change in terms of building time for us!
We will be prioritizing this feature this year. Stay tuned..
Any news on this? @swaminator
Any updates on this ? We are also seeing this issue.
We are also running into this
We will be prioritizing this feature this year. Stay tuned..
This was promised over a year ago, any updates? Our builds are working with the fix above but its very slow.
We switched to Vercel. It is 4x faster for us...
+1 would love to control build instance size
@imtiazqumar worked perfect for me, but without sudo...
phases: preBuild: commands: - export NODE_OPTIONS=--max-old-space-size=16384 - fallocate -l 4G /swapfile - chmod 600 /swapfile - mkswap /swapfile - swapon /swapfile - swapon -s
In case it helps somebody else in my situation I had to run these steps at the start of the build phase rather than preBuild to resolve my errors.
@swaminator this has been an issue well over a year. Can you please advise on the fix time?
I am facing the same issue, i am building a react app and amplify frontend build is giving me this error
The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process
I had to do two things to resolve 1) as per @Hernanm0g
phases:
preBuild:
commands:
- fallocate -l 4G /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- swapon /swapfile
- swapon -s
2) Troubleshoot environmental variables, which were used by build script .
amplify.yml
are in the correct format as per below
version: 1
env:
variables:
key: value
frontend:
Hi! I encountered this when trying to deploy a Next.js + pnpm application. Is this issue working towards a solution?
@sho-pb I was getting an error trying to deploy monorepo Next.js app with turbo and pnpm and was getting error that container run out of memory, but then I encountered in the docs https://docs.aws.amazon.com/amplify/latest/userguide/monorepo-configuration.html for pnpm in .npmrc
file node-linker=hoisted
needs to be added, that worked for me
@albert-kovalevskij Your comment probably saved me a couple hours. Thank you!!
@imtiazqumar worked perfect for me, but without sudo...
phases: preBuild: commands: - export NODE_OPTIONS=--max-old-space-size=16384 - fallocate -l 4G /swapfile - chmod 600 /swapfile - mkswap /swapfile - swapon /swapfile - swapon -s
Unfortunately this solution doesn't work anymore with the newest Amazon Linux:2023 default build image (fallocate -l 4G /swapfile raises permission denied).
However, creating a custom-built image based on Amazon Linux:2023 still allows this workaround to be used (and also install node 18.18.2 if required). See https://github.com/aws-amplify/amplify-hosting/issues/3773#issuecomment-1797860643
An option to customize the build instance capacity is really needed.
Is your feature request related to a problem? Please describe. For now the build instances are hosts with 4 vCPU, and 7GB memory.
Describe the solution you'd like I'd like to be able to increase the CPU, Memory, and maybe other settings to decrease the build time of my project.
Additional context I'm working on a +1 year project, and so far the build time has increased since we added additional features/settings to our project. The build configuration has already been optimised, but the provisionning time and build time still takes 7 to 10 minutes.