Instance stops working when I'm working with ansible

0

Hello, I will try to be as lucid and possible. I'm trying to simulate a CI/CD pipeline that integrates Jenkins and ansible. My issue is I've noticed that whenever I try to do this, my instance where I've installed Jenkins and ansible just stops working. The health check still shows 2/2 but

1- my Jenkins page on my browser stops responding 2- The remote SSH connection to my server disconnects too.

Funny thing is , the playbook runs fine on my terminal but, the moment I go on the Jenkins site and try to run the pipeline that invokes the playbook everything stops, SSH connection disconnects and I have to stop and restart the instance. I'm not able to SSH back into the server until I stop and restart it

Could it be a CPU issue? Or could it be because I'm on free tier?

質問済み 9ヶ月前262ビュー
1回答
2
承認された回答

It doesn't have anything to do with free tier but the instance you'd have chosen under free tier eligible instances. As you mentioned, you are using free tier eligible EC2 instance, which can be t2.micro and it comes only with 1VCPU and 1GB of RAM. This can be pretty low for your use case.

I'd suggest you to setup CloudWatch monitoring to observe CPU, memory metrics before launching those two processes.

Once instance freezes, check cloudwatch metric and see where the resources limits are being hit. You might need to consider an instance of higher configuration. You'd typically see this behavior when CPU usage or memory is maxed out.

See Monitoring Instances using Cloudwatch for more details. With this you'd clearly know where is the problem and accordingly you'll need to do the rightsizing of EC2 instance for your use case.

You may not find a free tier eligible instance for your use case.

Hope this helps.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
エキスパート
回答済み 9ヶ月前
profile pictureAWS
エキスパート
iBehr
レビュー済み 9ヶ月前
  • Thank you Abhishek, you were right. I played and set up a SNS + Cloudwatch. The problem was the CPU load, CPU usage hits 100% when I try to run the playbook from Jenkins. Immediately I switched to a t3-medium instance type everything ran smoothly.

    Don't know why I didn't think about this before😅😅....Thank you very much, I really really appreciate your help.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ