【发布时间】:2019-02-08 13:42:50
【问题描述】:
在我的 terraform 部署中,我有设置
setting {
namespace = "aws:elasticbeanstalk:container:tomcat:jvmoptions"
name = "Xms"
value = "2048m"
}
setting {
namespace = "aws:elasticbeanstalk:container:tomcat:jvmoptions"
name = "Xmx"
value = "2048m"
}
setting {
namespace = "aws:elasticbeanstalk:container:tomcat:jvmoptions"
name = "JVM Options"
value = "-XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution -Xloggc:log/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=100M"
}
在容器选项中,我可以看到应用了Xms、Xmx 和 GC 设置。但是当我从容器下载完整日志时,我无法在任何地方找到 GC 日志。可能是什么问题?我用常见的 GC 设置阅读了answer,但在我的情况下它不起作用。我用Tomcat 8.5 with Java 8 running on 64bit Amazon Linux/3.1.0
【问题讨论】:
-
请提供完整的
Dockerrun.aws.json,其次,您是否将awslogs定义为日志驱动程序只能在cloudwatch中查看日志?第三,记录保存在容器或 ec2 实例中的某些内容,您是否登录了 ec2 实例并搜索了它们?
标签: java garbage-collection tomcat8 terraform amazon-elastic-beanstalk