systemctl says the PHP FastCGI Process Manager failed to start
Failed to start The PHP FastCGI Process Manager.Short answer
The systemd message only says that php-fpm exited. The reason is in the journal or in php-fpm's own config test. Run the test with -t. It reports what it cannot parse. The common causes are a broken directive, a pool missing a mandatory setting such as listen or user, or a pool set to run as root.
Fix it fast
1Find out which cause you have
Ask systemd for the last lines of the unit, then ask php-fpm itself to test its configuration. Replace 8.3 with the version you installed.
sudo journalctl -u php8.3-fpm -n 30 --no-pager sudo php-fpm8.3 -t2Match what you see, then jump to its fix
- 1
The -t test prints an error instead of exiting quietlyA directive or file in the configuration is invalidFix - 2
The pool section has no listen, user, pm or pm.max_children lineA pool is missing a mandatory settingFix - 3
The pool section has user = root, or the service was changed to run workers as rootA pool is set to run as rootFix
- 1
What does the error look like?
Failed to start The PHP FastCGI Process Manager.
Cause 1 of 3
A directive or file in the configuration is invalid
1Check
php-fpm has a test mode: -t tests the configuration file and exits, and -tt also dumps the configuration it read. A typo, a stray character or a bad include in php-fpm.conf or a pool file stops the service.
sudo php-fpm8.3 -tt2Fix
Open the file the test points at, correct the directive, then run the test again until it reports no errors.
sudo nano /etc/php/8.3/fpm/pool.d/www.conf
sudo php-fpm8.3 -t3Verify
Start the service and check its state.
sudo systemctl restart php8.3-fpm && systemctl is-active php8.3-fpmConfirmed by raw.githubusercontent.com
Cause 2 of 3
A pool is missing a mandatory setting
1Check
The PHP manual marks listen and user as mandatory for each pool. It does the same for pm and pm.max_children. A pool file copied from an example, or edited by script, can lose one of them.
grep -nE '^(\[|listen|user|group|pm)' /etc/php/8.3/fpm/pool.d/*.conf2Fix
Add the missing directives to the pool. The listen value can be an ip:port pair, a port or a path to a Unix socket.
[www]
user = www-data
group = www-data
listen = /run/php/php8.3-fpm.sock
; keep your existing pm and pm.max_children lines3Verify
Run the configuration test and then start the service.
sudo php-fpm8.3 -t && sudo systemctl restart php8.3-fpmConfirmed by php.net
Cause 3 of 3
A pool is set to run as root
1Check
The php-fpm man page lists -R as the switch that allows a pool to run as root, and says this is disabled by default. Without it, a root pool is refused.
grep -n "^user" /etc/php/8.3/fpm/pool.d/*.conf2Fix
Run the pool as an unprivileged user such as the web server's user, and make the application's folders readable and writable by that user.
user = www-data
group = www-data3Verify
Restart and check that workers are not root.
sudo systemctl restart php8.3-fpm && ps -o user,cmd -C php-fpm8.3Confirmed by raw.githubusercontent.com
How do I stop it coming back?
- Run php-fpm -t before every restart or reload after editing a pool or php.ini.
- Keep one pool file per application so a broken pool is easy to find.
- Do not hand-edit configuration without a version-controlled copy to roll back to.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
Apache returns 504 Gateway Timeout when PHP takes too long
Quick requests work, slow ones end in a 504 after a fixed wait
A 504 from Apache means the backend did not answer within the proxy timeout.
2 causes, each with a fixServers
Composer reports a different PHP version than php -v on Ubuntu
You are running 8.1.2.
Composer takes its PHP version from the interpreter that runs it, unless config.platform fakes one.
3 causes, each with a fixServers
docker-php-ext-install mbstring fails: oniguruma not found
The docker-php-ext-install step exits with a non-zero code
mbstring needs the Oniguruma library to build its regex functions, and the PHP build finds it through pkg-config.
3 causes, each with a fixServers
Laravel returns 500 Internal Server Error on Apache
/var/www/html/.htaccess: RewriteCond: bad flag delimiters
Apache and Laravel report different 500s.
5 causes, each with a fixServers
nginx gives up waiting for the app and returns 504
upstream timed out (110: Connection timed out) while reading response header from upstream
nginx returns 504 when the app behind it takes the request but sends nothing back within proxy_read_timeout (60 seconds by default), or when the connection cannot be opened in time.
5 causes, each with a fixServers
nginx and PHP-FPM show File not found or Primary script unknown
File not found.
PHP-FPM received a script path it could not turn into a file.
4 causes, each with a fix