Insufficient memory on EC2 during a Jenkins builds. Adjust the infrastructure
Closed this issue · 3 comments
LyashenkoGS commented
The application is deployed on an EC2 micro instance (1GB Ram).
Currently EC2 serves
- Jenkins
- Docker
- MongoDB
- MongoDB web UI (Mongo express)
To fix:
- disable MongoDB UI
- if this will not help -> disable a MongoDB
To prevent such things:
- Setup Jenkins email notifications on a build fail
- Setup Zabbix based monitoring. Zabbix server and agents installation process should be automated by ansible playbooks.
- Research possibility to switch to AWS container service. Consider a need in a MongoDB, preferably installed on an EC2.
A screenshot after a build fail due to insuficcient memmory size that shows the application ~200mb and jenkins ~300mb RAM
LyashenkoGS commented
Fixed the build. There was no running MongoDB, nor mongo-express. Usage of the memory by Jenkins process was about 34%. I restarted the process and rerun the build manually
LyashenkoGS commented
Jenkins notifications have been set-up using extended e-mail notifications plugin.
LyashenkoGS commented
Not relevant any-more because of switching to own server with proper amount of resources