LPIC-1 Essential System Services and Networking Practice Question
A web server running Apache on Linux is experiencing slow response times. The administrator runs 'netstat -tuln' and sees many connections in TIME_WAIT state. Which of the following is the best course of action to improve performance?
⚠ Common exam trap
Test-takers frequently confuse Apache's KeepAlive directives (HTTP-level persistent connections) with TCP-level keepalive and TIME_WAIT management, leading them to incorrectly choose options that adjust HTTP keep-alive settings instead of addressing the TCP socket state.
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
✓
Enable TCP keepalive and adjust kernel parameters for faster reuse.
TIME_WAIT connections indicate that the server is waiting for lingering packets before fully closing TCP sockets. Enabling TCP keepalive and adjusting kernel parameters like net.ipv4.tcp_tw_reuse (or net.ipv4.tcp_tw_recycle in older kernels) allows the kernel to reuse sockets in TIME_WAIT state for new connections, reducing resource exhaustion and improving performance under high connection rates.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the KeepAliveTimeout directive.
Why it's wrong here
Longer timeout means connections stay open longer, but does not reduce TIME_WAIT.
- ✗
Disable the KeepAlive directive.
Why it's wrong here
Disabling keepalive creates more connections, increasing TIME_WAIT.
- ✓
Enable TCP keepalive and adjust kernel parameters for faster reuse.
Why this is correct
Adjusting tcp_tw_reuse and tcp_tw_recycle can reduce TIME_WAIT.
- ✗
Increase the MaxKeepAliveRequests directive.
Why it's wrong here
This might increase TIME_WAIT if requests are completed quickly.
Visual reference
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.