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:
- Disk full —
df -h /varshows 100% on/var/cpanelor/usr/local/cpanel/logs. Free space (truncate or rotate old logs); WHM resumes within seconds. - Stuck config lock —
lsof /var/cpanel/cpanel.configshows a process holding the lock. Identify the holder (often a stuck/scripts/upcpor a hungwhmapi1call from a script), kill it cleanly with SIGTERM first, then SIGKILL if needed. - Bad Tweak Setting — the error log shows a perl exception referencing a Tweak Setting key. Edit
/var/cpanel/cpanel.configdirectly with the offending key set to its documented default; WHM recovers on next request. - License problem —
/usr/local/cpanel/cpkeycltto re-fetch the license. A revoked or expired license causes WHM to throw on auth even though cPanel for end users still works. - Out of memory —
dmesg | tailfor 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. - 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.