Skip to content

Example scenario · cPanel/WHM platform stabilization · mail flow · CloudLinux LVE tuning

Stabilizing a multi-tenant cPanel/WHM platform that had stopped delivering mail

An example scenario: ~80 cPanel accounts on one WHM server, mail delivery collapsed, LSAPI OOM kills, ModSecurity false positives. Six weeks of in-place stabilization, 90 days of measured outcomes.

Illustrative client profile: Canadian hosting reseller / in-house IT · ~80 cPanel accounts. This example scenario shows how we approach the work; it does not describe a specific client, and its figures are illustrative.

Outcomes

Monthly traffic
Mixed · ~80 cPanel accounts · 12-15M outbound mail attempts/mo
Uptime
99.94% post-stabilization
Response p95
Mail delivery rate 97.4% (was ~78% at engagement start)
Tickets
−72% across tenant accounts
Incident response
Sev-1 ack 9 min · cPanel NOC escalation 4 min
Migration window
In-place stabilization · zero account migrations
MRR
Transition to Managed Cloud Ops retainer in month 3
Infra cost change
Within budget · no scale-up required

The Spamhaus notification arrived on a Thursday morning. The shared outbound IP for the entire WHM server had landed on SBL the night before, the operator had not noticed for nine hours, and by the time the inbound office mail started bouncing back from the platform’s own tenants, the outbound delivery rate — pulled from the Exim mainlog and the rspamd history — had been below 80% for the better part of a month. Nobody had been watching the right number.

The same week, the operator had opened two parallel investigations. ModSecurity had started throwing 500s on legitimate uploads on three WordPress tenants — the kind of error that looks like the application’s fault until you read the audit log. And one of the platform’s tenants, a small B2B portal running a noon-scheduled reporting cron, had been pinning the database tier’s I/O queue for forty-five minutes every weekday. The cron’s owner had been told by their developer that “WordPress is slow,” and three other tenants on the same disk had been opening tickets that said the same thing for two unrelated reasons.

The call to Stack Harbor was forwarded from a former client who had told them, accurately, that they did not want a migration. They wanted somebody senior to look at the box, tell them what was broken, and fix it without moving 80 accounts.

At a glance

  • Multi-tenant cPanel/WHM server, ~80 accounts, mixed WordPress / Drupal / Joomla, deteriorating mail delivery and recurring noon I/O storms. Six weeks of in-place stabilization, no account migrations, no scale-up.
  • Outbound mail delivery rate restored from a measured ~78% to the high 90s across the first 90 post-stabilization days. Zero blacklist incidents in the 90-day window. Bounce-rate band stable.
  • Support ticket volume from tenants down 72% at 90 days, with the surviving tickets shifting away from “the site is slow” and toward feature requests the operator could actually price.
  • cPanel and LiteSpeed brought current and held on a documented patching cadence. ModSecurity ruleset updated and tuned against the platform’s actual traffic, not a generic profile.

What we found on the box

The audit ran for the first eight working days. No production changes. The deliverable was a thirty-page document the operator’s lead engineer could read end to end and that became the spine of the six-week sequence.

cPanel and LiteSpeed. cPanel was three minor versions behind. LiteSpeed Enterprise was on a release line that had two relevant CVEs in the changelog and one performance regression already fixed upstream. EasyApache profile had not been rebuilt in eighteen months and was still carrying a PHP 7.4 handler that no tenant was using.

CloudLinux LVE. LVE limits were the platform default. Three tenants had been running close to their EP (entry processes) ceiling at peak, with lveinfo showing sustained throttling between 11:00 and 13:00 local time every weekday. One tenant was below 30% of the default pmem ceiling at peak — they were paying for capacity they did not need while their neighbour throttled.

LSAPI workers. The platform was running mod_lsapi with a per-account worker config that had been copy-pasted from a generic CloudLinux tutorial. The OOM-kill pattern in dmesg was textbook: the workers were sized for the host’s old memory profile, not the current one, and CageFS-restricted PHP processes were being killed mid-request under load. The kill events lined up perfectly with the noon I/O storm.

JetBackup. Configured. Running. Three of the last six daily backups had failed silently because the destination disk had filled to 92%. Nobody had tested a restore in fourteen months. We restored a random account’s backup into a sandbox on day three of the audit; it came back clean, but the exercise was the point.

MySQL. The server was running MariaDB on the cPanel default tuning. innodb_buffer_pool_size was 512 MB on a host with 128 GB of RAM. The slow query log was off. The noon cron storm was hitting the same disk as the OS and the mailmandb. There was room to move on every axis.

Mail flow. This was the deepest layer of the audit. Outbound Exim was healthy. The platform’s SPF and DKIM records were technically present — _domainkey selectors had been generated by WHM — but two tenants had wildcard DNS at their registrar that was breaking DMARC alignment, and the shared outbound IP had been on three other lower-tier blocklists for the past six weeks before the Spamhaus listing forced a response. rspamd was running on the default scoring thresholds; the operator had never tuned it against the platform’s actual outbound profile, which included one tenant who was sending newsletters from a list they had bought, unbeknownst to anyone.

ModSecurity. The ruleset was fourteen months stale. The operator had disabled four rules in an emergency the previous summer and never re-enabled them. Two of the false positives on the WordPress tenants were against a rule that had been refined upstream nine months earlier — the platform was running a version that flagged a legitimate plupload boundary as an SQLi probe.

The single artifact that made the rest of the audit land was a one-line callout we put in the document. The platform’s mailmandb had not been pruned in three years and was 4.7 GB. The recommended reset path was a controlled WHM > Mailman Mailing Lists > Reset after a forensic export, scheduled inside the maintenance window, not during the noon storm. We did not run it during the audit. We staged it for week three.

Why not migrate

We are an MSP. The first thing the operator asked us — politely, because the call had been forwarded by somebody whose migration we had run two years prior — was whether we were going to propose moving the platform to a new server, a new data centre, or a fresh cluster.

We do not propose migration when stabilization is the cheaper, lower-risk path. On this engagement, three things made stabilization the correct call:

The hardware was not the problem. The host had headroom on CPU, RAM, and disk IOPS that the platform’s actual workload was not using. The symptoms looked like resource exhaustion because three tenants were over-consuming a default budget that had never been tuned to the host’s real capacity.

The cPanel/WHM stack was the right product. The operator’s tenants — small business sites, two regional Drupal installs, a Joomla portal — were exactly the workload cPanel/WHM is designed to serve. Replatforming to a managed-WordPress product would have orphaned a third of the portfolio. Replatforming to a fresh cPanel server on a different data centre would have moved eighty accounts and eighty DNS zones, with eighty windows of risk, to solve a problem we could fix in place.

The operator had institutional memory in the existing box. Three years of mailmandb history, custom Exim ACLs, a hand-rolled tenant onboarding script. Migration would have either lost that or doubled the audit work.

The honest version, which we wrote into the proposal: migration is the right answer when the platform’s architecture is wrong for the workload, when the underlying hardware has run out of room, when the data centre’s network or compliance posture no longer fits, or when the existing operator has so little visibility into the current state that a fresh build is faster than reverse-engineering the old one. None of those conditions held here. The platform needed an audit and six weeks of focused work, not a move.

The stabilization sequence

Six weeks. Order of operations was the deliverable that mattered more than any individual fix.

Week 1 — Stop the bleeding on mail. We did not warm a new IP. We rehabilitated the existing one. The Spamhaus listing was removed inside 36 hours after the operator’s outbound traffic showed clean for the prior 24 hours, which required us to first identify and quarantine the one tenant whose newsletter list was the proximate cause. The tenant moved to a transactional ESP for that traffic — a conversation Stack Harbor mediated and the operator priced. SPF was rebuilt to a single coherent record per domain, with the platform’s outbound IP and the tenant’s ESP explicitly listed. DKIM selectors were rotated on the four highest-volume domains with new 2048-bit keys. DMARC was added at p=none with rua= reporting to a mailbox we monitored, then walked to p=quarantine in week four after the reporting confirmed alignment on >99% of the platform’s outbound. rspamd thresholds were tuned against a week of actual scoring data — the platform had been rejecting legitimate transactional mail on a rule that was scored for a different workload profile.

Week 2 — CloudLinux LVE rebalancing. We pulled four weeks of lveinfo history, identified the four tenants whose actual usage was outside the default budget, and rebuilt the LVE template on a per-account basis. A trimmed version of the actual config callout, as it was committed:

# /etc/container/lve.cfg fragment (representative, not the production file)
[tenant_high_traffic]
SPEED=200%
PMEM=2048M
VMEM=0
NPROC=100
EP=40
IO=2048
IOPS=1024

[tenant_default]
SPEED=100%
PMEM=1024M
VMEM=0
NPROC=60
EP=20
IO=1024
IOPS=512

[tenant_low]
SPEED=50%
PMEM=512M
VMEM=0
NPROC=30
EP=10
IO=512
IOPS=256

Three tenants moved up. Twelve moved down. The composite ceiling stayed inside the host’s actual capacity with a measured headroom of about 35% at peak. The noon throttling band collapsed by week three.

Week 3 — Patching gap. cPanel was brought current on a Saturday maintenance window with a documented rollback (cPanel’s restore path, snapshot of /etc/cpanel and /var/cpanel, and a documented one-command revert if the upgrade pulled a regression we had not caught in the dry run on a clone of the host). LiteSpeed Enterprise was upgraded the following Tuesday inside a 23:00 ET window. EasyApache was rebuilt with PHP 8.1, 8.2, and 8.3 handlers, the 7.4 handler removed, and per-account selectors set to the version the tenant was actually running. ModSecurity ruleset was refreshed; the four rules the operator had disabled the previous summer were either re-enabled (two of them — the upstream had refined the rule) or left off with a documented exception (two of them, where the false positive was structural to a specific tenant’s plugin and a future surgical exclusion was scheduled). LSAPI worker config was sized against the post-LVE budget. The OOM-kill events stopped on week three.

Week 4 — The cron storm. The tenant’s noon reporting cron was the architectural problem we had been waiting to fix. Their developer had written it as a single-shot wget against an in-app endpoint that ran 40 concurrent database queries to build a CSV. We did not rewrite their application. We added a per-account cron jitter (a sleep $((RANDOM \% 600)) prelude on the schedule) and moved the heavy queries onto a queued worker that drained over twenty minutes instead of forty-five seconds. The disk I/O alert at noon was gone by week five. The tenant did not know we had touched anything.

Week 5 — ModSecurity hardening. With the platform stable, we ran the OWASP CRS at paranoia level 2 with a tenant-specific exclusion file for the three WordPress sites where the legitimate upload pattern was flagged. The rule we had identified during the audit was already fixed upstream; the exclusion file was for the residual cases. ModSecurity false-positive volume dropped to single digits per week.

Week 6 — JetBackup, MySQL, and a restore drill. JetBackup destination disk was migrated to a dedicated remote target. Backups were running to two destinations by the end of the week with a tested restore documented as the close-out of the engagement. MariaDB was retuned — innodb_buffer_pool_size raised to 32 GB, slow query log enabled with a 500 ms threshold, query cache disabled (it was actively hurting on a write-heavy workload). The mailmandb reset ran in the maintenance window on the Saturday of week six. The WHM > Mailman > Reset path was used after a forensic export; the database came back at 180 MB.

The cPanel NOC escalation

Week four. The LiteSpeed Enterprise upgrade had landed cleanly, but the cPanel-side WHM UI was showing a stale handler version for a specific tenant whose PHP selector had been switched mid-upgrade. The handler was running correctly — the server was serving the right binary — but the WHM dashboard was reporting the old version, and the operator’s tenant-facing portal pulled its data from the same RPC. Tenants were going to see the wrong PHP version on their dashboard at the next refresh cycle.

Stack Harbor is a cPanel NOC partner. The Sev-2 escalation ticket was filed against cPanel’s product team that morning with a reproducible artifact: a clone of the host’s /var/cpanel/users and a transcript of the upgrade sequence. The first response came in four hours. The patch came back from cPanel in eleven days as a point release on the maintenance line we were already running. We staged the patch on a clone, validated it against the affected tenant, and rolled it on the next maintenance window. The operator’s tenant portal showed the correct PHP version on the cycle after the rollout. No tenant ticket was opened.

The partner channel is not a hotline for ordinary tickets — it is the path for product-level bugs that cannot be worked around inside the operator’s box. We use it once or twice a year per platform on average. The value is the response time and the fact that the engineer on the other end has the source.

90 days after

The operator measured against the metrics we had agreed on at the start of week one, not against a marketing benchmark.

Mail delivery. The outbound delivery rate measured at the rspamd history layer recovered into the high 90s within the first 30 days post-stabilization and held there across the 90-day window. We give the number as a range because mail delivery is sensitive to recipient-side filters that the platform does not control; the qualitative shift was that no tenant was opening a delivery-failure ticket by week eight, and the inbound-side bounce reports that had been arriving daily had stopped by week six.

Blacklist incidents. Zero across the 90-day window on Spamhaus, SpamCop, Barracuda, SORBS, and the four other lists the operator’s monitoring was checking. The pre-engagement six-month baseline had been three listings.

Tickets. Inbound tenant tickets down 72%. The categories shifted. “The site is slow” went from the top three to single-digit volume. “I cannot send email” was effectively eliminated. The surviving tickets were feature requests, plugin questions, and DNS changes — the work the operator was set up to bill for.

Disk I/O. The noon storm did not return. The dashboard for the database tier showed a flat I/O profile across the noon hour for the entire 90-day window.

Patching. cPanel, LiteSpeed, and ModSecurity rule set on a documented monthly cadence. EasyApache rebuild scheduled on the same cycle. The operator’s calendar has the maintenance window. We run it.

Sev-1 posture. Two Sev-1 acknowledgements in the 90-day window, both inside the 10-minute SLA. One was a Cloudflare-side AS routing incident that pulled three tenant sites offline for the duration of the upstream event; the senior on rotation acknowledged in nine minutes and the runbook had the right escalation path. The cPanel NOC channel was opened twice — the patch above, and one routine LiteSpeed integration question.

Commercial. The operator moved to an Managed Cloud Ops retainer in month three. The retainer covers 24/7 acknowledged response, the patching cadence, quarterly restore drills, ModSecurity tuning against current traffic, mail flow monitoring, and quarterly LVE rebalancing. The cron storm runbook is in the same documentation set as the mail flow runbook.

What we’d say to another team running multi-tenant cPanel

If you are running a multi-tenant cPanel/WHM platform and the mail flow has started drifting, the temptation is to warm a new IP. Do not start there. Start with the audit. The IP is a symptom. The cause is somewhere in the configuration of CloudLinux LVE, the rspamd scoring, the SPF/DKIM/DMARC alignment across your tenant domains, and — frequently — the one tenant on your platform whose outbound profile is moving the entire shared reputation against you. You cannot fix any of that by moving the IP.

The same applies to “the site is slow” tickets on a multi-tenant box. The cause is rarely “WordPress.” It is almost always cross-tenant contention — one tenant’s cron, one tenant’s plugin, one tenant’s unindexed table — landing on a default LVE budget that was set when the platform had ten accounts on it, not eighty.

Stabilization is a real option. It is the right option when the platform’s architecture fits the workload and the hardware has the room. We have run this engagement on six platforms in the past two years. None of them migrated.

If you are looking at the same symptoms, we will tell you honestly whether your box wants stabilization or whether it wants a move. Most of the time, on a healthy cPanel/WHM platform that has just been left alone too long, the answer is stabilization. That is what the Deployment / Management service is built around.


This is an example scenario: an illustrative engagement that shows how we approach this kind of work. It does not describe a specific client, and its figures are illustrative.

Running a similar platform? Talk to a senior cPanel engineer about an audit. Related reading: The WordPress security hardening checklist for cPanel/WHM hosts.

Tell us what you're running. We'll tell you what needs to change.

Book a consult with Stack Harbor. We will review your current environment, risk points, support needs, and the best path forward.