• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue php fpm service Failed

Suba68

New Pleskian
Server operating system version
CentOS Linux 7.9.2009 Core
Plesk version and microupdate number
18.0.58 last updated on Feb 15, 2024
Hi, hope someone can help. We are currently encountering the following issue found on Log Browser. Our server details are:

CentOS Linux 7.9.2009 (Core)
Plesk Obsidian - Version 18.0.5
We are using php 8.1.27 run php as FPM application server by Apache
Under service management, PHP-FPM 8.0.30 & 8.1.27 are both on and ticked.

I don't have Linux skills; however, I can manage/navigate Plesk to some degree.

Apprecate any help and guidance - Thank you in advance.

Error found in Log Browser status failed.


Execution status has failed with exit code 3, stdout: ● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/php-fpm.service.d
└─limit_nofile.conf
Active: failed (Result: exit-code) since Mon 2024-02-19 03:11:24 GMT; 2 weeks 3 days ago
Main PID: 15547 (code=exited, status=78)
 
Do you have SSH access? Could you please show the full output of

# systemctl restart plesk-fpm80-fpm && systemctl status plesk-fpm80-fpm
# systemctl restart plesk-fpm81-fpm && systemctl status plesk-fpm81-fpm

Corrected:
# systemctl restart plesk-php80-fpm && systemctl status plesk-php80-fpm
# systemctl restart plesk-php81-fpm && systemctl status plesk-php81-fpm

It is needed for a detailed error message.

Most often PHP-FPM fails if there are no domain configuration files for a version or if a file is pointing to a non-existent domain directory. The configuraton files can be checked in the /opt/plesk/php/8.0/etc/php-fpm.d and /opt/plesk/php/8.1/etc/php-fpm.d directories.
 
Last edited:
Do you have SSH access? Could you please show the full output of

# systemctl restart plesk-fpm80-fpm && systemctl status plesk-fpm80-fpm
# systemctl restart plesk-fpm81-fpm && systemctl status plesk-fpm81-fpm

It is needed for a detailed error message.

Most often PHP-FPM fails if there are no domain configuration files for a version or if a file is pointing to a non-existent domain directory. The configuraton files can be checked in the /opt/plesk/php/8.0/etc/php-fpm.d and /opt/plesk/php/8.1/etc/php-fpm.d directories.
Hi Peter, Thank you for your prompt response, and I apologise for the delay in responding. The server is in a live environment, so I presume that there will be some small downtime due to the restart of Plesk. If that's the case, we will have to do this when traffic is low, which is normally before sunrise.
 
Do you have SSH access? Could you please show the full output of

# systemctl restart plesk-fpm80-fpm && systemctl status plesk-fpm80-fpm
# systemctl restart plesk-fpm81-fpm && systemctl status plesk-fpm81-fpm

It is needed for a detailed error message.

Most often PHP-FPM fails if there are no domain configuration files for a version or if a file is pointing to a non-existent domain directory. The configuraton files can be checked in the /opt/plesk/php/8.0/etc/php-fpm.d and /opt/plesk/php/8.1/etc/php-fpm.d directories.
Hi Peter, please find the output from the commands you have asked us to run;

systemctl restart plesk-fpm80-fpm && systemctl status plesk-fpm80-fpm
failed to restart plesk-fpm80-fpm.service: unit not found.

Same for both 80 & 81

Any further help would be appreciated.
Thanks
 
I am soooo sorry, I mistyped! It's

# systemctl restart plesk-php80-fpm && systemctl status plesk-php80-fpm
# systemctl restart plesk-php81-fpm && systemctl status plesk-php81-fpm
 
I am soooo sorry, I mistyped! It's

# systemctl restart plesk-php80-fpm && systemctl status plesk-php80-fpm
# systemctl restart plesk-php81-fpm && systemctl status plesk-php81-fpm

Result:
plesk-php81-fpm.service - The PHP 8.1.27 FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/plesk-php81-fpm.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/plesk-php81-fpm.service.d
└─limit_nofile.conf, respawn.conf
Active: active (running) since Thu 2024-03-21 05:21:27 GMT; 3ms ago
Main PID: 26474 (php-fpm)
Status: "Ready to handle connections"
CGroup: /system.slice/plesk-php81-fpm.service
└─26474 php-fpm: master process (/opt/plesk/php/8.1/etc/php-fpm.conf)

Mar 21 05:21:27 OURDOMAIN.COM systemd[1]: Starting The PHP 8.1.27 FastCGI Process Manager...
Mar 21 05:21:27 OURDOMAIN.COM systemd[1]: Started The PHP 8.1.27 FastCGI Process Manager.

Result:
plesk-php80-fpm.service - The PHP 8.0.30 FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/plesk-php80-fpm.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/plesk-php80-fpm.service.d
└─limit_nofile.conf, respawn.conf
Active: active (running) since Thu 2024-03-21 04:42:59 GMT; 34min ago
Main PID: 21251 (php-fpm)
Status: "Processes active: 0, idle: 0, Requests: 0, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/plesk-php80-fpm.service
└─21251 php-fpm: master process (/opt/plesk/php/8.0/etc/php-fpm.conf

Mar 21 04:42:59 OURDOMAIN systemd[1]: Starting The PHP 8.0.30 FastCGI Process Manager...
Mar 21 04:42:59 OURDOMAIN systemd[1]: Started The PHP 8.0.30 FastCGI Process Manager.
 
There should be no issues on the system. The vendor based PHP might not be active because it is missing a configuration file. This is the case when no services need it for anything. Do you actually experience issues with PHP in your websites? Else the initially posted error message can be ignored as that would be expected.
 
Hi Peter, We feel the php is slow on the backend of the website. We are actively looking for ways to enhance the php execution time.

I have attached the domain configuration and the PHP FPM service under the watchdog. The service is currently stopped. Do I need to start the service via the command line?
Screenshot 2024-03-22 at 13.33.04.png
 

Attachments

  • Screenshot 2024-03-22 at 13.54.16.png
    Screenshot 2024-03-22 at 13.54.16.png
    357.3 KB · Views: 3
The error message on the log browser has changed to the one below. The newrelic that was installed I believe was deleted.


Execution status has failed with exit code 3, stdout: ● php-fpm.service - The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/php-fpm.service.d
└─limit_nofile.conf
Active: failed (Result: exit-code) since Fri 2024-03-22 13:57:40 GMT; 2min 5s ago
Process: 23455 ExecStart=/usr/sbin/php-fpm --nodaemonize (code=exited, status=78)
Main PID: 23455 (code=exited, status=78)

Mar 22 13:57:40 OURDOMAIN.com systemd[1]: Starting The PHP FastCGI Process Manager...
Mar 22 13:57:40 OURDOMAIN.com php-fpm[23455]: [22-Mar-2024 13:57:40] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/newrelic.so' - /usr/lib64/php/modules/newrelic.so: cannot open shared object file: No such file or directory in Unknown on line 0
Mar 22 13:57:40 OURDOMAIN.com php-fpm[23455]: [22-Mar-2024 13:57:40] ERROR: No pool defined. at least one pool section must be specified in config file
Mar 22 13:57:40 OURDOMAIN.com php-fpm[23455]: [22-Mar-2024 13:57:40] ERROR: failed to post process the configuration
Mar 22 13:57:40 OURDOMAIN.com php-fpm[23455]: [22-Mar-2024 13:57:40] ERROR: FPM initialization failed
Mar 22 13:57:40 OURDOMAIN.com systemd[1]: php-fpm.service: main process exited, code=exited, status=78/n/a
Mar 22 13:57:40 OURDOMAIN.com systemd[1]: Failed to start The PHP FastCGI Process Manager.
Mar 22 13:57:40 OURDOMAIN.com systemd[1]: Unit php-fpm.service entered failed state.
Mar 22 13:57:40 OURDOMAIN.com systemd[1]: php-fpm.service failed.
, stderr:
 
One issue with the installation: newrelic.so is missing. Probably an add-on you once installed, then removed, but didn't remove it from the PHP .ini file. This needs to be removed from the .ini file.

Second issue: no pool defined. it means that no domain is configured to use that service.

Your question on speed: The dedicated PHP-FPM handler and version 8.3 will be best, but in that case you also need to start/stop the service yourself. Speed depends on many more factors, not just PHP itself. PHP itself is fast, but scripts are often bad, e.g. spend a lot of useless time in while...next for for...next loops assigning or reading variables that they could also have read just once before they entered a loop. There are tons of other things that can make a script faster.

First make sure PHP is working at all. Then use Plesk Performance Booster to apply some optimizations to it.
 
Hi Peter, Thank you for the info.

Regarding the fact that no pool is defined, how do we set this up correctly?

According to /opt/plesk/php/8.0/etc/php-fpm.d and /opt/plesk/php/8.1/etc/php-fpm.d directories. Our domain is listed in this configuration.

Thanks,
 
Regarding the fact that no pool is defined, how do we set this up correctly?
When a domain is configured to use a specific PHP version, you'll find a configuration in /opt/plesk/php/<version>/etc/php-fpm.d. With such a configuration file a pool is considered "defined" and PHP will work as expected.
 
Hi, I checked all versions inside "/opt/plesk/php/<version>/etc" - however, I could not find newrelic.so

When NewRelic was deleted, it was not deleted as per the guidance found here.
 
Is there any output from

# grep -R newrelic /etc/php-fpm.d
# grep -R newrelic /opt/plesk/php/*/etc/*

?
 
Is there any output from

# grep -R newrelic /etc/php-fpm.d
# grep -R newrelic /opt/plesk/php/*/etc/*

?
Hi Peter,
# grep -R newrelic /opt/plesk/php/*/etc/*
The above command gave an output. Too long to paste on here.

# grep -R newrelic /etc/php-fpm.d - No output.
 
Hi Peter,
# grep -R newrelic /opt/plesk/php/*/etc/*
The above command gave an output. Too long to paste on here.
It shows in which PHP files "newrelic" is mentioned. Could you maybe provide an excerpt (with redacted domain names)?
 
Please find extract below.

/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; PHP agent configuration
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:extension = "newrelic.so"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:[newrelic]
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.enabled
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.enabled = true
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.license
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; /etc/newrelic/newrelic.cfg, but ONLY if you installed via rpm/yum
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; or dpkg. The key is saved in /etc/newrelic/upgrade_please.key
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; daemon and are still usingnewrelic.cfg (see below) the license
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; urge you to remove /etc/newrelic/upgrade_please.key in order to
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:newrelic.license = "eu01xxe2d719bcbab5387059328322fb180c76eb"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.logfile
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:newrelic.logfile = "/var/log/newrelic/php_agent.log"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.loglevel
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.loglevel = "info"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.high_security
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic.transaction_tracer.record_sql.
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic.attributes configuration settings.
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic_add_custom_parameter
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic_set_user_attributes
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic_record_custom_event
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic.security_policies_token. Only one may be set. If both are
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.high_security = false
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.appname
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:newrelic.appname = "PLESK PHP 5.4"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.process_host.display_name
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.process_host.display_name = ""
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Apache or PHP-FPM. All of the newrelic.daemon.* settings are options that
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; /etc/newrelic/newrelic.cfg) and running the chkconfig or equivalent command.
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Please see the newrelic.cfg template file for details. That template file
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; is located at /usr/lib/newrelic-php5/scripts/newrelic.cfg.template.
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Also please note that the options here and in newrelic.cfg are identical,
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; except that in this file they are preceded with "newrelic.daemon.".
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.daemon.logfile
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.daemon.loglevel
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.daemon.loglevel = "info"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.daemon.port
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Default: /tmp/.newrelic.sock
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; /tmp/.newrelic.sock. If you want to use UNIX domain sockets then
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:newrelic.daemon.port = "/run/@.newrelic.sock"
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.daemon.ssl_ca_bundle
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; newrelic.daemon.ssl_ca_path is also set (see below), the
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; certificates contained in the newrelic.daemon.ssl_ca_path
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:;newrelic.daemon.ssl_ca_bundle = ""
/opt/plesk/php/5.4/etc/php.d/newrelic.ini:; Setting: newrelic.daemon.ssl_ca_path
 
Back
Top