C100DBA Application Administration Practice Question
What is the primary function of the 'wtimeout' setting in write concern?
⚠ Common exam trap
Candidates often believe 'wtimeout' is a performance setting to speed up queries, rather than a safety setting to prevent application threads from hanging indefinitely.
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
✓
It specifies the duration to wait for replica set acknowledgment.
The 'wtimeout' parameter prevents a write operation from blocking indefinitely if the specified replica set members cannot acknowledge the write. This is a critical safety mechanism for application availability. If a network partition occurs or a node goes offline, the application will receive an error after the timeout, allowing it to handle the failure gracefully instead of hanging the application thread and exhausting the connection pool, which could lead to cascading service outages.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It sets the maximum time a query can run before being killed.
Why it's wrong here
The parameter for killing a long-running query is maxTimeMS, not wtimeout. wtimeout is strictly related to the acknowledgment of write operations within a replica set and has no impact on the execution duration of read-only operations or complex aggregation pipelines running on the server.
- ✓
It specifies the duration to wait for replica set acknowledgment.
Why this is correct
wtimeout specifies how long the primary should wait for the required number of replica set members to acknowledge the write operation. If the acknowledgment does not occur within this duration, the primary returns an error to the client, preventing the application from hanging indefinitely during cluster failures.
- ✗
It limits the number of write retries in the driver.
Why it's wrong here
Write retries are handled by the driver's 'retryWrites' configuration, which is a separate setting. wtimeout does not trigger retries; it simply returns an error to the calling application when the acknowledgment threshold is not met within the specified time, leaving retry logic to be implemented by the application developer.
- ✗
It defines the connection timeout for new sessions.
Why it's wrong here
Connection timeout is controlled by the 'connectTimeoutMS' setting in the connection string. This parameter is used during the initial handshake between the driver and the database node to establish a TCP connection, and it is unrelated to the acknowledgment process of individual write operations in a cluster.
About these practice questions
This C100DBA question is part of Courseiva's 222-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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 MongoDB exam blueprint
This C100DBA practice question is part of Courseiva's free MongoDB 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 C100DBA exam.