在我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
你所面临的问题是许可。您tomcat
用户下启动该服务,因此不能访问该路径来创建日志。
试试这个-Xloggc:/var/log/tomcat8/gc.log