- Le plus récent
- Le plus de votes
- La plupart des commentaires
Thx for posting - you likely already have solved it but for other googlers that might reach this post I'll go with my similar problem and solution.
My jvm based service was allocated to much heap memory: 6.3G
I have these jvm args: -XX:+UseContainerSupport -XX:MaxRAMPercentage=80.0
Using the amazoncorretto:8u232 to my understanding a modern java 8 with back-ported docker features so this documentation should hold: https://www.eclipse.org/openj9/docs/xxusecontainersupport
For me the solution was to add the Memory
setting on both the task and the container for example this cloudformation snippet - based on https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html:
"Resources": {
"Task": {
"Properties": {
"RequiresCompatibilities": ["FARGATE"],
"NetworkMode": "awsvpc",
"ExecutionRoleArn": "<some role>",
"Cpu": 1024,
"Memory": 2048,
"ContainerDefinitions": [
{
"Memory": 1792,
"Essential": true,
"Image": { "Fn::Join" : [ ":", [ "<service-docker-image>", { "Ref": "ImageTag" } ] ] },
...
},
{
"Memory": 256,
"Essential": true,
"Image": { "Fn::Join" : [ ":", [ "<service-docker-nginx-proxy>", { "Ref": "ImageTag" } ] ] },
...
and with this the java service logs memory consumption:
heap memory usage: init = 29360128(28672K) used = 1081712776(1056360K) committed = 1162170368(1134932K) max = 1636040704(1597696K)
Roughly 1.6G for the heap which sounds sound.
Edited by: pellekrogholt on Jan 3, 2020 4:07 AM
Edited by: pellekrogholt on Jan 3, 2020 4:07 AM
Contenus pertinents
- demandé il y a 6 mois
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 5 ans
- AWS OFFICIELA mis à jour il y a 2 ans