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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南