Restart Elastic Beanstalk App Server when Health is Severe

0

Hello, I am running a spring boot application on Elastic Beanstalk using Tomcat 8.5 with Corretto 11 running on 64bit Amazon Linux 2/4.2.12. Every couple of days I am getting the error "Following services are not running: tomcat.", with Severe Health status and a down server. I am not seeing useful information in the catalina.2022-xx-xx.log files. Restarting the app server fixes the issue. Instance type is t2.micro. I would appreciate help in understanding

  1. how to understand what is wrong with my setup.

  2. recover and restart the server automatically so I won't have to manually do it every time until a fix has been found.

Thank you.

  • Hi, Have you checked the monitoring tab in your ec2 t2.micro instance? I guess the error can be a lack of CPU/RAM, ...

질문됨 2년 전2327회 조회
1개 답변
0

The tomcat / catalina.log logs should reveal the cause, you may need to up the logging level or add additionally logging. It is possible it is resource related and some of the tomcat memory parameters need updating eg max heap size but you need to be sure this is the cause.

if you are using a load balancer you could add a load balancer health check and configure automatic termination within the autoscale group (I believe this is not a native config and will require ebextensions)

If not using a load balancer you could add a cloudwatch alarm on the environment health metric and then configure an alarm action to reboot the instance - see here

AWS
전문가
Peter_G
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠