TL; DR
In your instances (t2.micro in my case) the memory runs out, because the instance promotion is parallelized.
Hacking Resolution: Specify instance SWAP space and try again
For one-time use, at the time of entry into the instance ...
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 sudo /sbin/mkswap /var/swap.1 sudo chmod 600 /var/swap.1 sudo /sbin/swapon /var/swap.1
From / in more detail: How to add swap to an EC2 instance?
During deployment, we use the SWAP bit, but without fail
Mem: 1019116k total, 840880k used, 178236k free, 15064k buffers Swap: 1048572k total, 12540k used, 1036032k free, 62440k cached
Actual Permissions
Large instances
- While storage can be scaled through EBS, instances come with a fixed processor and RAM, the source of AWS .
- The cost of money, and these are just instances of dev, where mem is just a problem during promotion
Automate swap preparation in ElasticBeanStalk
- Maybe
.ebextensions/ - Open question: cloud formation style or hook when deploying / restarting?
Switch to "no server"
- The promise of the Gateway + Lambda + Friends API is that we do not need to deal with this ish.
- Are you tall enough for cloud microservices? Are they even suitable for your problem when something unstable / unfashionable such as SOA is enough.
- Once you switch to cloud mode, returning to on-prem will be difficult, which is a requirement for some.
Use less bloated packages
- Sometimes you are stuck in outdated
- May be caused by necessary transitive or subdependent. Where does it end ... the decomposition of other people's libraries?
Description
A quick google shows that ENOMEM is an out-of-memory error. t2.micro instances have only 1 GB of RAM.
Rarely will we use this amount on dev; however, ElasticBeanstalk parallelizes parts of the assembly process through the generated workers. This means that during SETUP for large packets, out of memory may end and the operation will fail.
Using free -m , we can see ...
Get started (plenty of free memory)
total used free shared buffers cached Mem: 1019116 609672 409444 144 45448 240064 -/+ buffers/cache: 324160 694956 Swap: 0 0 0
Exit the memory at the next tick)
Mem: 1019116 947232 71884 144 11544 81280 -/+ buffers/cache: 854408 164708 Swap: 0 0 0
Process Deployment Aborted
total used free shared buffers cached Mem: 1019116 411892 607224 144 13000 95460 -/+ buffers/cache: 303432 715684 Swap: 0 0 0