I successfully build a one project. My project contain-
- One NextJS Application for main site
- One NextJS Application for Admin Dashboard
- One NestJS application for APIs(I am using Github)
My project is not a big project, instead it is a medium project. My backend has 6-7 Module for managing.For deploying in production my project, I choose aws ec2.
I take AWS EC2 t2.2xlarge instance type which has 8vCPU and 32GB Ram. On this EC2 Instance, I deploy that two nextjs application and one nestjs application. I also install PostgreSQL for database on EC2. For automatic backing, I am using cronjob and s3.
I am facing one problem. I am seeing that, AWS EC2 stop working when a github action is triggering. All the live site stop working. I need to reboot aws ec2 manually for coming back them.
I am not understanding, what is the problem.
- Is my t2.2xlarge is not enough?
- Or any configuration issues?
What instance type should I use?
Note: One my previous project I get same issue on t2.micro(1vCPU and 1GB Memory), and then I update it to t2.xlarge and then it do not the face that issues. On that project, I run two nextjs and one nestjs application.