Courseiva
Operations and Support →mediumMultiple Choice

CV0-004 Operations and Support Practice Question

A cloud operations team runs a containerized workload on Amazon ECS with tasks spread across an Auto Scaling group of EC2 instances. During a peak-traffic event, the team observes that a single task repeatedly restarts with an out-of-memory error while the host instance still shows 40% free memory. The team wants the scheduler to stop placing new tasks on that host when its committed memory is exhausted. Which action should the team take?

⚠ Common exam trap

The trap here is assuming that the container memory hard limit controls scheduling, when it only caps a single container's usage.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Set a task memory reservation in the task definition so ECS accounts for that memory when placing tasks on the instance.

The restart loop happens because the scheduler lacks information about committed memory, so it keeps packing tasks onto a host that cannot actually hold them. Declaring a memory reservation per task gives the scheduler the data it needs to refuse placement on an exhausted instance. The hard limit only caps a single container and does not influence placement decisions, and scaling or resizing does not correct the underlying bin-packing logic.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Set a task memory reservation in the task definition so ECS accounts for that memory when placing tasks on the instance.

    Why this is correct

    A task memory reservation informs the ECS scheduler how much memory each task needs, so tasks are only placed on instances with enough unreserved capacity. The hard limit caps a container's usage, but the reservation is what prevents over-commitment across tasks. Setting it makes the scheduler leave the host alone once committed memory is exhausted, which is exactly the observed failure.

  • ✗

    Increase the EC2 instance type size in the Auto Scaling group launch template and recycle the instances.

    Why it's wrong here

    A larger instance gives more total memory, which buys headroom, but without reservations the scheduler still treats the host as having capacity for more tasks. It is a capacity fix, not a placement fix, and it costs more while leaving the over-commitment behavior intact. The same restart pattern can reappear as density grows.

  • ✗

    Enable ECS managed scaling on the service and lower the target capacity utilization threshold.

    Why it's wrong here

    Managed scaling adds or removes tasks based on CloudWatch metrics, but it does not change how the scheduler bins tasks onto individual container instances. Scaling out could spread load, yet a task can still be placed on an already-committed host before new capacity arrives. The out-of-memory restarts would continue during the placement window.

  • ✗

    Raise the container memory hard limit in the task definition so the task can use the host's remaining free memory.

    Why it's wrong here

    Raising the container memory limit does let the process consume more of the host's spare RAM, but it does not stop the scheduler from over-committing that host. Other tasks keep landing there, so the instance eventually runs out of physical memory and the same restart loop returns under load. It treats the symptom on one task rather than the placement behavior of the cluster.

About these practice questions

One of 834 original CV0-004 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.