DOP-C02 exam dumps

DOP-C02 practice question 325 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 325

Select 3

You are managing an application hosted on Amazon ECS using the Fargate launch type. Recently, one of the ECS tasks has started failing intermittently, and logs indicate an 'OutOfMemoryError'. You need to troubleshoot and resolve this issue. What should you do to address the problem?

  1. A

    Increase the task's CPU and memory resource allocation in the ECS task definition.

  2. B

    Enable Amazon CloudWatch Container Insights to monitor memory utilization trends.

  3. C

    Configure ECS Service Auto Scaling to increase the number of running tasks.

  4. D

    Inspect the application code to identify potential memory leaks or inefficient memory usage.

  5. E

    Move the application to an EC2-backed ECS cluster for better resource control.

Show answer and explanation

Correct answers: A, B, D

Explanation

To troubleshoot and resolve the 'OutOfMemoryError', you need to address both potential resource constraints and application-level issues. Increasing the task's resource allocation ensures the application has enough resources to operate, while enabling CloudWatch Container Insights helps you monitor and analyze memory utilization trends over time. Additionally, inspecting the application code for memory leaks or inefficient memory usage is essential to identify and fix the root cause of the problem. Scaling the number of tasks or changing the cluster type does not address the specific issue of a single task running out of memory.

  • A. Correct.

    Increasing the task's CPU and memory resource allocation is a valid approach to resolve 'OutOfMemoryError' issues, as it provides the application with more resources to operate.

  • B. Correct.

    Enabling Amazon CloudWatch Container Insights allows you to monitor memory utilization trends, which can help identify whether the task is running out of memory due to insufficient resource allocation or other issues.

  • C. Incorrect.

    Configuring ECS Service Auto Scaling does not address the root cause of an 'OutOfMemoryError' in a single task. This option is more focused on scaling the number of tasks based on metrics rather than solving task-specific resource issues.

  • D. Correct.

    Inspecting the application code for memory leaks or inefficient memory usage is crucial to address the root cause of memory-related failures. This can help prevent similar issues in the future.

  • E. Incorrect.

    Moving the application to an EC2-backed ECS cluster does not directly address the 'OutOfMemoryError' issue. The problem lies in resource allocation or application behavior, not the underlying platform.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam