When a WordPress site is intermittently slow and the application logs say nothing, the PHP-FPM slow log is usually where the answer lives. On a managed cPanel server it captures a backtrace whenever a request exceeds a configured threshold — which is exactly the information needed to tell whether the slow request is stuck in a database query, an HTTP call to a third party, or a regex inside a plugin.
What’s actually happening
PHP-FPM watches the duration of each request. When a request crosses request_slowlog_timeout (commonly 5 seconds for a publisher site, 10 seconds for an admin-heavy site), the pool dumps a PHP backtrace of every active worker into a log file. The trace shows the exact function call where the worker was at that moment — so a request stuck on mysqli_query shows up differently from one stuck on curl_exec or preg_match.
On cPanel/EasyApache 4, slow logs live per pool, named after the cPanel user.
How to verify
Slow logs on EA4 are usually under /opt/cpanel/ea-php<NN>/root/usr/var/log/php-fpm/. To list them:
ls -la /opt/cpanel/ea-php*/root/usr/var/log/php-fpm/ 2>/dev/null
Tail the slow log for the affected account:
tail -200 /opt/cpanel/ea-php81/root/usr/var/log/php-fpm/<cpanel-user>.slow.log
The output is a series of backtraces. A representative entry:
[14-May-2026 14:32:11] [pool example_com] pid 24871
script_filename = /home/example/public_html/index.php
[0x00007f3a] mysqli_query() /home/example/public_html/wp-includes/class-wpdb.php:2330
[0x00007f3a] WP_Query->get_posts() /home/example/public_html/wp-includes/class-wp-query.php:3120
The bottom of the stack is what was running. mysqli_query deep in wp-query is a slow database query. curl_exec in a plugin’s HTTP client is an external API call blocking the worker. preg_match repeated dozens of times across runs of the slow log is usually a regex on a large content blob.
If the threshold is not set, enable it. In WHM, go to MultiPHP Manager, edit the pool config for the domain, and add request_slowlog_timeout = 5s plus slowlog = /opt/cpanel/ea-php<NN>/root/usr/var/log/php-fpm/<user>.slow.log. Restart the pool.
The fix
The slow log tells you which class of fix to make. Repeated database backtraces mean an index is missing or a plugin is doing SELECT * across a large postmeta table. Repeated curl_exec traces mean a synchronous external call has to be moved to a background job. Repeated theme template traces mean the front-end work needs to move behind a page cache, not be fixed in PHP. Without the slow log, all three look like “the site is slow.”
Stack Harbor’s Deployment & Release Management practice tunes pool configs as part of the managed cPanel operating model. If your slow log is empty or unreadable, we can take a look.