performancemavenjenkinsamazon-ec2instance

AWS EC2 t2.micro Unlimited | Jenkins Maven | Very slow | Build hangs


I have an EC2 t2.micro instance with RHEL 8. I have installed Jenkins, created a Maven project, connected git repository. I run the build, it goes through the first few steps....then hangs and does not respond at all, then I have to stop and start the instance again. If I leave it hanging, the build comes back with :

"Maven JVM terminated unexpectedly with exit code 137"

and the build fails. I have T2 Unlimited on the instance so I don't understand why this is happening? I see a lot of people running maven builds multiple times through Jenkins on t2.micro instances...

I run the exact same on t2.small and it runs fine...but my frustration is with the t2.micro...


Solution

  • The solution was to change the EC2 instance type from t2.mirco to t2.small or t2.medium, which have more memory and the maven build runs just fine.