Skip to content

whostmgrd troubleshooting — when WHM goes unresponsive and the cause is local

WHM hangs or returns 500s on every page. Before restarting blind, a short triage flow that catches the common causes — stuck processes, full disk, locked config.

WHM is unreachable. The customer-facing cPanel and the public sites still respond, but https://server.example.com:2087/ either hangs or returns a generic 500. The instinct is to restart cpsrvd, and sometimes that works. More often the underlying cause is something specific — a stuck process holding a config lock, a full disk preventing log writes, a misconfigured Tweak Setting that crashes on read. Five minutes of triage is cheaper than restarting cpsrvd three times.

What’s happening

whostmgrd is the WHM web server, a perl-based daemon that handles WHM HTTPS requests on port 2087. It shares process state with cpsrvd (cPanel for end users on 2083) and cpdavd (WebDAV). When WHM hangs and cPanel still works, the issue is usually whostmgrd-specific — a stuck process, a flock on /var/cpanel/cpanel.config, or a Tweak Setting that triggers an exception when WHM tries to render the main page.

How to verify

The triage flow before any restart:

systemctl status cpanel
ps -ef | grep -E 'whostmgrd|cpsrvd'
ss -tln | grep 2087
df -h /var
tail -100 /usr/local/cpanel/logs/error_log
strace -p $(pgrep -f whostmgrd | head -1) 2>&1 | head -30

The error log usually names the file or function where WHM is hanging. The strace shows what the live process is actually doing — if it’s blocked on flock against cpanel.config, the config is locked by another process.

The fix

In order of likelihood:

  1. Disk full — df -h /var shows 100% on /var/cpanel or /usr/local/cpanel/logs. Free space (truncate or rotate old logs); WHM resumes within seconds.
  2. Stuck config lock — lsof /var/cpanel/cpanel.config shows a process holding the lock. Identify the holder (often a stuck /scripts/upcp or a hung whmapi1 call from a script), kill it cleanly with SIGTERM first, then SIGKILL if needed.
  3. Bad Tweak Setting — the error log shows a perl exception referencing a Tweak Setting key. Edit /var/cpanel/cpanel.config directly with the offending key set to its documented default; WHM recovers on next request.
  4. License problem — /usr/local/cpanel/cpkeyclt to re-fetch the license. A revoked or expired license causes WHM to throw on auth even though cPanel for end users still works.
  5. Out of memory — dmesg | tail for OOM kills. WHM forks for each request; under memory pressure those forks die before serving the response. Increase the swap if needed and investigate what’s pressuring memory.
  6. As a last resort, restart cpsrvd — systemctl restart cpanel. This terminates open sessions but rarely takes more than five seconds. If the restart doesn’t fix it, the cause is elsewhere on the box.

For shops with WHM uptime in their SLA, Stack Harbor’s cPanel and WHM management practice wires the triage flow into runbooks so on-call engineers have the right sequence to run before reaching for a restart.