Sometimes my application dies w/o any reason and I can detect that using CloudWatch and CPU usage metric going down. At this moment I want to restart the java application or the whole EC2 instance. Any suggestions how can I achive that?
相关问题
- JQ: Select when attribute value exists in a bash a
- How to upgrade/install Upstart deamon version 1.5
- Connecting to Windows Server Service Bus on AWS
- how to get the available capacity of a zone in AWS
- Amazon S3: Grant anonymous access from IP (via buc
相关文章
- I cannot locate production log files on Elastic Be
- AWS Cloud watch alarm, triggering autoscaling usin
- AWS - Configuring access to EC2 instance from Bean
- Error: “The security token included in the request
- Ansible Timeout (12s) waiting for privilege escala
- resource:memory error when trying to run an ECS ta
- Spark EC2 SSH connection error SSH return code 255
- GPU based algorithm on AWS Lambda
If only your application halt but EC2 instance works.
You could write a shell monitor the app using CloudWatch API and shoot the app when necessary,then make it a task in cron. Or you can using a shell right in your EC2 instance.
To restart your EC2 instance automatically is way too dangerous ,you can try Autoscaling, which automatically starts a new instance when your instance frozen and keep your SLA.
AWS CloudWatch now provides a reboot EC2 instance action.
You can let CloudWatch terminate your EC2 instance and let AutoScaling bring up another "fresh" instance with your application configured.