简体   繁体   English

AWS EC2 免费套餐实例经常自动停止

[英]AWS EC2 free tier instance is automatically stopping frequently

I am using ubuntu 18.04 on AWS EC2 instace free tier, running websites on apache server, NodeJS with PostgreSQL database.我在 AWS EC2 实例免费层上使用 ubuntu 18.04,在 apache 服务器上运行网站,NodeJS 与 PostgreSQL 数据库。 All deployments are done perfectly and webapps works fine without any exception or error details.所有部署都完美完成,webapps 工作正常,没有任何异常或错误细节。

However I am facing an annoying issue: this instance is stopping frequently without any exception or error logs.但是我面临一个烦人的问题:这个实例经常停止,没有任何异常或错误日志。 After rebooting instance everything starts working fine but after some time it automatically stops either in few hrs.重新启动实例后,一切都开始正常工作,但一段时间后它会在几小时内自动停止。 on same day when rebooted instance or in 1-2 days after that.在重启实例的同一天或之后的 1-2 天。

I created another free tier instance with seperate account and that is also giving same issue.我用单独的帐户创建了另一个免费层实例,这也给出了同样的问题。 I am not finding any logs or troubleshoot option to get rid of this problem.我没有找到任何日志或故障排除选项来解决这个问题。

I would like to know how it can be troubleshooted or where can i find logs of any errors or exception for this isntance?我想知道如何对其进行故障排除,或者在哪里可以找到有关此实例的任何错误或异常的日志?

Suggestion given by AWS in "Instance Status Checl" as attached below are not practicle solution to apply evertime. AWS 在下面附上的“Instance Status Checl”中给出的建议不是每次应用的实际解决方案。

在此处输入图像描述

在此处输入图像描述

在此处输入图像描述

Something with your VM itself is causing its health checks to fail.您的 VM 本身的某些问题导致其运行状况检查失败。

Have a look at syslogs, and your application logs.查看系统日志和您的应用程序日志。 Also take a look at CloudWatch metrics to see if any metrics have dramatic change close to time.还可以查看 CloudWatch 指标,看看是否有任何指标在接近时间时发生了巨大变化。

You can also add a CloudWatch alarm with a recovery action to automatically reboot if there's an issue with your VM.如果您的 VM 出现问题,您还可以添加具有恢复操作的 CloudWatch 警报以自动重新启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM