1

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...

SGh
  • 33
  • 4
  • Yo have a memory problem. See this question https://stackoverflow.com/questions/24989653/jenkins-maven-build-137-error. The unlimited only afects the CPU, not the memory – nacho Sep 18 '19 at 11:01
  • Thanks for pointing me to that thread, it explains a lot. So I take it there is noway to deal with the t2.micro issue other than change it to a bigger instance. I find it very strange that other people with the same configuration using the same git repository can run this build multiple times with no problem... – SGh Sep 18 '19 at 11:14

1 Answers1

1

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.

SGh
  • 33
  • 4