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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则