Running Java services on AWS Elastic Container Service (ECS) Fargate and optimizing the Java Heap Setting.Issues faced with containers being killed due to excessive memory usage and OutOfMemoryError exceptions.Steps taken to optimize JVM parameters including adjusting MaxHeapSize and InitialHeapSize.Further considerations for optimizing Young Generation size and reducing GC time.