Courseiva
Question 813 of 724
Troubleshooting and OptimizationeasyMultiple ChoiceObjective-mapped

DVA-C02 Troubleshooting and Optimization Practice Question

A developer is troubleshooting a web application that intermittently returns HTTP 504 errors. The application runs on EC2 instances behind an Application Load Balancer. What is the most likely cause of these errors?

⚠ Common exam trap

Candidates often confuse HTTP 504 (Gateway Timeout) with HTTP 502 (Bad Gateway) or health check failures, leading them to select options related to security groups or health check mismatches instead of the correct idle timeout configuration.

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

The load balancer idle timeout is set too low, and the application takes longer than the timeout to respond.

HTTP 504 (Gateway Timeout) errors from an Application Load Balancer indicate that the load balancer successfully connected to the target (EC2 instance) but the target did not respond within the configured idle timeout period. The default idle timeout is 60 seconds, and if the application's processing time exceeds this value, the load balancer terminates the connection and returns a 504. Option C directly addresses this mismatch between the load balancer timeout and the application response time.

Answer analysis

Option-by-option breakdown

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

  • The target group is using an HTTPS health check but the instances only support HTTP.

    Why it's wrong here

    If the target group's health check protocol (HTTPS) does not match the instance's supported protocol (HTTP), the load balancer will mark the instances as unhealthy. Consequently, it will not forward traffic to them, or if it does, the backend will fail to respond correctly, resulting in an HTTP 502 Bad Gateway error. A 504 specifically means the load balancer waited for a response but didn't get one within its timeout, not a protocol mismatch.

  • The load balancer's cross-zone load balancing is disabled.

    Why it's wrong here

    Disabling cross-zone load balancing means that each load balancer node only distributes traffic to targets within its own Availability Zone. While this can lead to uneven traffic distribution and potential overload in specific zones, it does not directly cause an HTTP 504 Gateway Timeout. A 504 error indicates a timeout waiting for a response from a *single* backend instance, not a broad distribution problem across zones.

  • The load balancer idle timeout is set too low, and the application takes longer than the timeout to respond.

    Why this is correct

    The load balancer idle timeout specifies the maximum duration the load balancer will wait for a response from a registered target before closing the connection. If the backend application takes longer to process a request and send a response than this configured timeout, the load balancer will terminate the connection. This action directly results in an HTTP 504 Gateway Timeout error being returned to the client, indicating a lack of timely response.

  • The security group for the EC2 instances is missing an inbound rule for the load balancer.

    Why it's wrong here

    A missing inbound rule in the EC2 instance security group for the load balancer prevents the load balancer from establishing a TCP connection to the backend instance. This connection failure typically manifests as a connection timeout from the load balancer's perspective, often leading to HTTP 502 Bad Gateway or 503 Service Unavailable errors. A 504 Gateway Timeout, however, implies a connection was successfully established but no response was received within the specified idle period.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 24, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services 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 DVA-C02 exam.