NCAE Mapping Hub
Overview Scoreboard Data Roles Exercised Checklists Lessons Skill Drills Practice Terminal Progress
WWW Content timeout 1x weight estimate

WWW Content timeout. Apache accepting connections but not responding in time

Timeout
Events
1,700
Pts per check
1.4
Pts missed
2,361.1
Teams hit
9/13

Authority mappings

Which work roles, knowledge units, and EWU courses this error pattern touches. Hover for context, click to drill in.

EWU courses: CSCD212 CSCD380

What the message means

Apache accepts the connection but doesn't return a full HTTP response before the scoring engine's timeout. Common causes: overloaded worker pool, slow backend (PHP / DB), infinite redirect loop, or a script stuck in a loop.

Why the service is down

Commands in order

  1. 1. 1. How many Apache workers busy?
    ps aux | grep -c '[a]pache2' ; echo ; apachectl status 2>/dev/null || curl -s http://localhost/server-status?auto 2>/dev/null
    Expect
    Worker count below MaxRequestWorkers
    Interpret and next
    If at max: tune `MaxRequestWorkers` higher, or find what's holding workers.
  2. 2. 2. What does the slow endpoint return locally?
    time curl -s -o /dev/null -w '%{http_code} %{time_total}\n' http://localhost/
    Expect
    HTTP 200 or 302 in under 1 second
    Interpret and next
    Slow or hung = the app itself is the problem, not Apache.
  3. 3. 3. Check for redirect loops
    curl -s -L -o /dev/null -w '%{num_redirects} %{url_effective}\n' http://localhost/
    Expect
    0 or 1 redirect, ending at a stable URL
    Interpret and next
    Many redirects = fix the app config (often WordPress siteurl).
  4. 4. 4. Check DB responsiveness
    time psql -U torch_bearer -d db -c 'SELECT 1;' 2>&1
    Expect
    Under 100ms
    Interpret and next
    Slow = DB overloaded. Restart Postgres, check for runaway queries.
  5. 5. 5. Nuclear: restart Apache
    systemctl restart apache2
    Expect
    Service restarted; requests processing again
    Interpret and next
    This resets worker count. use when the student can't find the root cause quickly.

Decision tree

Answer each question to route to the right fix.

Q: Does `curl http://localhost/` return quickly (<1s)?
Yes: Network/firewall problem between Apache and scoring engine.
No:
Q: Are Apache workers pegged?
Yes: Find slow query/script; restart Apache as stopgap.
No: Check DB + app logs for stuck jobs.

External references

Other patterns on this service