+3 votes
in Operating Systems by (56.7k points)

My VPS is running on Debian 10. I have installed PHP7.4 for my applications. When I try to restart PHP7.4 service (systemctl status php7.4-fpm.service), I get the following error. How can I fix this error?

Mar 27 02:22:21 xxx.xxx.xxxx systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...

Mar 27 02:22:21 xxx.xxx.xxxx php-fpm7.4[12021]: [27-Mar-2022 02:22:21] WARNING: Nothing matches the include pattern '/etc/php/7.4/fpm/pool.d/*.conf' from /etc/php/7.4/fpm/php

Mar 27 02:22:21 xxx.xxx.xxxx php-fpm7.4[12021]: [27-Mar-2022 02:22:21] ERROR: No pool defined. at least one pool section must be specified in config file

Mar 27 02:22:21 xxx.xxx.xxxx php-fpm7.4[12021]: [27-Mar-2022 02:22:21] ERROR: failed to post process the configuration

Mar 27 02:22:21 xxx.xxx.xxxx php-fpm7.4[12021]: [27-Mar-2022 02:22:21] ERROR: FPM initialization failed

Mar 27 02:22:21 xxx.xxx.xxxx systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/CONFIG

Mar 27 02:22:21 xxx.xxx.xxxx systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.

Mar 27 02:22:21 xxx.xxx.xxxx systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manage

1 Answer

+2 votes
by (73.8k points)
selected by
 
Best answer

From the error "No pool defined. at least one pool section must be specified in config file", it seems that there is no config file in folder /etc/php/7.4/fpm/pool.d/. You can create a file 'www.conf' with the following content in that folder. It will solve the problem.
 

[www]
listen = /run/php/php7.4-fpm.sock
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 2
pm.process_idle_timeout = 10s
pm.max_requests = 100


...