Skip to content

PHP-FPM service logs

The PHP-FPM service is the master process of PHP’s FastCGI Process Manager (FPM). Each PHP version has its own PHP-FPM service.

View the logs

A server’s PHP-FPM service logs can be viewed from within the ServerPilot dashboard or through SSH.

Log file location

The PHP-FPM service logs can be accessed at the following paths while logged into a server as root.

/var/log/php8.4-fpm-sp.log

Log file format

The format of PHP-FPM service log entries depends on whether the log entry is related to the PHP-FPM service itself or whether the log entry is related to a specific app’s PHP-FPM pool.

For log entries related to the PHP-FPM service itself, the log format is:

[DATE_TIME] LOG_LEVEL: LOG_MESSAGE

For log entries related to a specific app’s PHP-FPM pool, the log format is:

[DATE_TIME] LOG_LEVEL: [pool APPNAME] LOG_MESSAGE

Both formats of log entries can be seen in the following example log entries:

[05-Mar-2025 17:33:05] WARNING: [pool example] child 320808, script '/srv/users/example/apps/example/public/wp-admin/admin-ajax.php' (request: "POST /wp-admin/admin-ajax.php?action=wp_gf_feed_processor") executing too slow (5.588836 sec), logging
[05-Mar-2025 17:33:05] NOTICE: child 320808 stopped for tracing
[05-Mar-2025 17:33:05] NOTICE: about to trace 320808
[05-Mar-2025 17:33:05] NOTICE: finished trace of 320808

The above example shows the log entries created in the PHP-FPM service log when a request’s execution time exceeds five seconds and a stack trace of the executing script is logged to the app’s PHP slow request log.

Example commands

You must be logged in as root to view the PHP-FPM service log.

Count slow requests

Terminal window
sudo grep -c -F "executing too slow" /var/log/php*-fpm-sp.log

View apps and script file names of slow requests

Terminal window
sudo grep -F "executing too slow" /var/log/php*-fpm-sp.log