Courseiva
Implement an instrumentation strategyhardMultiple ChoiceObjective-mapped

AZ-400 Implement an instrumentation strategy Practice Question

You are troubleshooting an intermittent performance issue in a web application. Application Insights shows a high number of failed dependency calls to Azure SQL Database. The errors are SqlException with error code -2 (timeout). What is the most likely cause and recommended fix?

⚠ Common exam trap

Watch out — candidates often confuse a connection timeout (error -2) with a query timeout or resource throttling, leading them to choose DTU scaling or deadlock solutions instead of recognizing the connection pool exhaustion pattern.

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 application is exhausting the connection pool; increase Max Pool Size in the connection string.

A is correct because SqlException with error code -2 indicates a connection timeout, which in a high-traffic scenario is most commonly caused by the application exhausting the connection pool. When all connections in the pool are in use and the wait time for a free connection exceeds the Connect Timeout (default 15 seconds), new requests fail with this error. Increasing Max Pool Size in the connection string (e.g., Max Pool Size=200) allows more concurrent connections, reducing contention.

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 application is exhausting the connection pool; increase Max Pool Size in the connection string.

    Why this is correct

    Connection pool exhaustion occurs when the application requests more connections than the configured Max Pool Size, forcing new requests to wait for a free connection until the connection timeout threshold is reached, which manifests as intermittent timeouts under load; increasing Max Pool Size or ensuring connections are properly disposed can resolve this.

  • The SQL Server firewall is blocking the application IP; add a firewall rule.

    Why it's wrong here

    A SQL Server firewall rule blocks traffic at the network or login layer, producing an immediate connection failure or login error before the application can acquire a connection; it does not cause wait-based timeouts after the connection pool is already in use, so this is not the cause of intermittent timeout symptoms.

  • The database is experiencing deadlocks; enable read committed snapshot isolation.

    Why it's wrong here

    Deadlocks are detected by SQL Server's lock manager and immediately terminated with error 1205, not by the application waiting for a connection timeout; enabling read committed snapshot isolation can reduce deadlock occurrences but does not affect connection pool timeout behavior.

  • The database DTU limit is being exceeded; scale up the service tier.

    Why it's wrong here

    Exceeding the DTU limit causes Azure SQL Database to throttle or queue queries, typically surfacing as performance degradation or resource-wait errors such as DTU waits, not as connection timeout exceptions from the application; scaling the service tier would not address a connection pool exhaustion issue.

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft 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 AZ-400 exam.