ECS::TaskDefinition – What is the maximum value of ‘Memory’ property?

here in this syntax of "ContainerDefinitions":[{Memory:500}] in AWS::ECS::TaskDefinition,

Memory property refers to virtual address space(hard limit) of docker container process in root CGROUP.

We are launching a jenkins container process on AWS EC2 using cloudformation resource type AWS::ECS::TaskDefinition. AWS EC2 is a 64 bit Linux OS.

On 32 bit Linux OS, virtual address space of a process, can go upto 3 GB.

On 64 bit Linux OS, virtual adress space of a process, can go upto Terabytes.

We are currently facing this stabilise-error due to, improper usage of Memory property.

On a 64 bit OS, what is the maximum value of Memory that can be given to jenkins container process? Because we are facing this stabilise-error

How to decide the value of Memory property?

Source: StackOverflow