A customer reports their Plesk-hosted site has gone from 800 ms to 12 seconds time-to-first-byte in the last two hours. The site itself hasn’t been deployed in three weeks. Nobody touched the Plesk panel. The most useful thing you can do in the first thirty minutes is not run a ten-thousand-line Apache log search — it’s to walk a fixed checklist that narrows the cause from “anywhere” to “this specific subsystem”, because Plesk performance degradation almost always lands in one of seven places.
What’s happening
A site on Plesk involves a stack: nginx → Apache → PHP-FPM → MySQL/MariaDB or PostgreSQL → filesystem → DNS for outbound calls. Add in: the host kernel, the disk, the network, and potentially a CDN. Each layer can degrade independently. The seven most-common failure surfaces, in order of frequency:
- PHP-FPM pool exhausted. All workers busy, requests queuing.
- MySQL slow queries. A new query plan, a missing index, table-level contention.
- Disk I/O saturation. Either bytes-per-second or IOPS exhausted, often from MySQL writes or log volume.
- Memory pressure → swap. Working set exceeded RAM, swap is hot.
- Inbound traffic spike. Legitimate or scraped traffic exceeding nginx capacity.
- Filesystem layer degradation. A specific large directory (
uploads/,cache/) has grown to where directory operations cost minutes. - Upstream dependency slow. A third-party API the application calls is responding in seconds, application waits synchronously.
The audit walks these in the right order. The wrong order — starting with “let me read the application code” — wastes 25 minutes before you’ve ruled out the easy wins.
How to verify
Walk the seven in order. Each check is one or two commands.
Check 1 — PHP-FPM pool exhaustion:
# Pool status for the domain's PHP version
PHP_VER=$(plesk bin domain --info example.com | awk '/PHP version/ {print $NF}' | tr -d '.')
curl -s http://127.0.0.1/fpm-status?pool=example.com 2>/dev/null
# Or look at the pool config + process count
grep -E 'pm.max_children|pm.start_servers|pm.max_spare_servers' \
/opt/plesk/php/*/etc/php-fpm.d/example.com.conf
ps aux | grep "[p]hp-fpm: pool example.com" | wc -l
# Look at FPM slowlog
grep $(date +%Y-%m-%d) /opt/plesk/php/*/var/log/example.com.slow.log | tail -20
Check 2 — MySQL slow queries:
# Currently-executing queries
mysql -e "SHOW FULL PROCESSLIST" | awk '$6 > 5 || /Locked/'
# Slow query log
tail -100 /var/lib/mysql/*-slow.log | grep -B1 'Query_time' | head -40
# Index stats — looking for table scans
mysql -e "SHOW GLOBAL STATUS LIKE 'Handler_read%'"
# Handler_read_rnd_next high relative to others = full table scans
Check 3 — Disk I/O:
# Live IO
iostat -x 2 5
# Look at %util (>80% = saturated) and await (>20 ms = slow)
# Per-process IO
iotop -aoP -b -n 3 -d 2 | head -30
Check 4 — Memory + swap:
free -h
vmstat 2 5
# si/so columns > 0 = swap is active
# Top memory consumers
ps aux --sort=-%mem | head -10
Check 5 — Inbound traffic:
# Requests per second to the affected domain over the last minute
awk '{print $4}' /var/www/vhosts/example.com/logs/access_log | \
cut -d: -f2-3 | sort | uniq -c | tail -5
# Unique IPs over the past minute
awk -v cutoff="$(date -d '1 minute ago' '+%d/%b/%Y:%H:%M')" \
'$4 > "["cutoff {print $1}' /var/www/vhosts/example.com/logs/access_log | sort -u | wc -l
Check 6 — Filesystem hotspot:
# Large directories in the document root
du -h --max-depth=2 /var/www/vhosts/example.com/httpdocs 2>/dev/null | sort -rh | head -20
# Directory inode count (slow if >100k)
for D in /var/www/vhosts/example.com/httpdocs/wp-content/cache \
/var/www/vhosts/example.com/httpdocs/wp-content/uploads \
/var/www/vhosts/example.com/tmp; do
[[ -d $D ]] && echo "$D: $(find $D -maxdepth 1 -type f | wc -l) files"
done
Check 7 — Outbound dependency:
# Tail the application log for slow outbound calls
tail -200 /var/www/vhosts/example.com/logs/error_log | grep -Ei 'timeout|curl|http_request|api'
# Or do a synthetic check on the API endpoint the app calls
curl -w "%{time_total}\n" -o /dev/null -s https://third-party-api.example.com/health
The fix
Match the check that came back hot.
Fix 1 — FPM pool exhaustion
If ps aux | grep "[p]hp-fpm: pool example.com" | wc -l is hitting pm.max_children, the pool is the bottleneck. Two cases:
- Legitimate traffic, pool undersized. Raise:
plesk bin domain --update example.com \
-php_settings 'pm=dynamic;pm.max_children=40;pm.start_servers=10;pm.min_spare_servers=5;pm.max_spare_servers=20'
systemctl reload plesk-php82-fpm
Watch memory — each worker holds a PHP interpreter. For a typical WordPress with WooCommerce, each worker uses 80-150 MB resident. 40 workers × 150 MB = 6 GB just for one domain.
- Bad code holding workers. A long-running cron, an outbound API hang. Identify with
phpfpm-topor inspect the slow log:
tail -100 /opt/plesk/php/8.2/var/log/example.com.slow.log
Fix the offending code or add a request_terminate_timeout:
plesk bin domain --update example.com \
-php_settings 'request_terminate_timeout=120'
Fix 2 — MySQL slow queries
The SHOW PROCESSLIST output names the slow query. Inspect with EXPLAIN:
EXPLAIN SELECT * FROM wp_posts WHERE post_status='publish' AND post_type='product' ORDER BY post_date DESC LIMIT 50;
If the row says Using filesort and the rows scanned is in the millions, add an index. For WordPress and WooCommerce, a few standard ones are routinely missing:
CREATE INDEX idx_post_status_type_date ON wp_posts (post_status, post_type, post_date);
CREATE INDEX idx_meta_key_value ON wp_postmeta (meta_key, meta_value(50));
ANALYZE TABLE wp_posts, wp_postmeta;
If the query is from a plugin that’s pathologically slow on a large dataset, the medium-term fix is a database read replica + read routing, not raw query tuning. Short-term fix: a query cache layer (object caching via Redis if the application supports it, transient caching via WP Toolkit’s built-in cache).
Fix 3 — Disk I/O saturation
If %util is pinned at 100%, you need to identify the culprit:
iotop -aoP -b -n 5 -d 2 | head -30
Common patterns:
- MySQL writes. Heavy
INSERT/UPDATEworkload on a database without proper indexing — every write touches multiple secondary indexes. The fix is application-level. As an emergency mitigation, raiseinnodb_log_file_sizeandinnodb_buffer_pool_size:
cat > /etc/my.cnf.d/zz-tuning.cnf <<'EOF'
[mysqld]
innodb_buffer_pool_size = 4G
innodb_log_file_size = 512M
innodb_flush_log_at_trx_commit = 2
EOF
systemctl restart mysqld
- Log volume. A debug logger left on in production. Find it:
find /var/www/vhosts/*/logs -type f -newer /tmp/marker -mmin -10 -exec ls -lh {} \; 2>/dev/null
Then truncate and disable the logger in the application config.
Fix 4 — Memory pressure / swap
If vmstat shows si/so > 0, the system is paging. Immediate options:
- Kill the largest non-essential consumer.
- Restart PHP-FPM (drops cached opcode memory, often a quick win on saturation):
systemctl reload plesk-php82-fpm
systemctl reload plesk-php81-fpm
Medium-term: add swap as a buffer, or reduce per-pool max_children across the fleet. Long-term: move to a bigger box, or split the workload (move databases off the web tier).
Fix 5 — Traffic spike
If RPS to a single domain has gone from baseline to 10×, three sub-cases:
- Legitimate spike (campaign launched, viral post). Scale FPM as in Fix 1. Add CDN/edge caching if not already in place.
- Scraper/bot flood. Identify and rate-limit:
# Top IPs in the last 5 minutes
awk -v cutoff="$(date -d '5 minutes ago' '+%d/%b/%Y:%H:%M')" \
'$4 > "["cutoff {print $1}' /var/www/vhosts/example.com/logs/access_log | \
sort | uniq -c | sort -rn | head
# Block in firewall
ipset create scraper-block hash:ip
ipset add scraper-block 198.51.100.42
firewall-cmd --permanent --add-rich-rule="rule source ipset=scraper-block drop"
firewall-cmd --reload
- DDoS-class flood. Out of scope for in-host fixes. Cloudflare or another scrubbing layer in front is the right answer.
Fix 6 — Filesystem hotspot
A directory with 200k+ files makes directory-iteration calls slow. Common in WordPress: wp-content/uploads/2024/01/ if the application writes one file per request.
# Inspect — and if it's safe, archive old contents
TARGET=/var/www/vhosts/example.com/httpdocs/wp-content/uploads/2023
find "$TARGET" -type f -mtime +365 -print0 | tar -czf /var/backups/old-uploads-2023.tar.gz --null -T -
# Once tarball is safely off-host, remove
find "$TARGET" -type f -mtime +365 -delete
For wp-content/cache/, just flush and restart caching:
sudo -u $(stat -c '%U' /var/www/vhosts/example.com/httpdocs) wp cache flush --path=/var/www/vhosts/example.com/httpdocs
Fix 7 — Slow upstream
If a third-party API is the bottleneck, the host-level fix is limited — the application needs a timeout and a circuit breaker. Short-term: identify and block the slow path:
# Add a synthetic timeout via nginx for that specific endpoint
# Plesk → domain → Additional nginx directives:
location /api/proxy/ {
proxy_pass http://127.0.0.1:7080;
proxy_read_timeout 10s;
proxy_connect_timeout 5s;
}
That returns a 504 to the user instead of having the worker wait 30 seconds for the upstream. Better than a stuck worker.
Post-fix validation
After the targeted fix, watch baseline metrics for 10 minutes:
# Latency from the Plesk host itself (synthetic, removes network variance)
for i in {1..20}; do
curl -w "%{time_total}\n" -o /dev/null -s https://example.com/
sleep 5
done
# FPM pool occupancy
watch -n5 'ps aux | grep "[p]hp-fpm: pool example.com" | wc -l'
If TTFB returns to baseline and pool occupancy is healthy, the fix held.
Stack Harbor runs Plesk performance audits under monitoring and support — with baselines per domain so you know what “normal” looks like before the customer call. Pair with environment management for ongoing tuning and capacity planning, or contact us if a Plesk fleet keeps degrading and the root-cause analysis isn’t catching up.