×

Plesk error FPM initialization failed - Fix it Now ?


Plesk error FPM initialization failed - Fix it Now ?

Plesk error FPM initialization failed happens when the PHP configuration file is incorrect.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers  to resolve related Plesk errors.

In this context, we shall look into how to resolve this Plesk error.


Nature of Plesk error FPM initialization failed

The "FPM initialization failed" error triggers in Plesk in many different formats. The exact reason for these errors varies.

Let us now discuss some of them and the fixes for the error.


1. ERROR: An another FPM instance seems to already listen php-fpm.sock

When the users create the subdomain via XML API, it is often noticed that PHP-FPM service fails to start on Plesk. 

A typical error that users notice in the /var/log/plesk-phpXX-fpm/error.log looks like:

ERROR: An another FPM instance seems to already listen on /var/www/vhosts/system/subdomain.example.com/php-fpm.sock
ERROR: FPM initialization failed

This generally happens when it generates an incorrect PHP configuration file during subdomain creation via XML API.


We followed methods to fix this error. 

a. The first solution involves deleting the unwanted configuration file using the steps below:

i. Log in to Plesk server via SSH.

ii. Remove the excess configuration file:

# rm -f /etc/php-fpm.d/subdomain.example.com.conf

b. Another solution involves switching the OS vendor with the steps below:

i. Log in to Plesk.

ii. Go to Domains > subdomain.example.com > PHP Settings.

iii. Switch to FPM by OS vendor and back to the desired PHP version.


2. ERROR: [/etc/php-fpm.d/www.conf:1] value is NULL for a ZEND_INI_PARSER_ENTRY

While creating a new subscription/domain in Plesk, the operation often fails with the following error message:

Error: phpinimng failed: configuration test '/usr/sbin/php-fpm --test' failed with code 78, and message:
ERROR: [/etc/php-fpm.d/www.conf:1] value is NULL for a ZEND_INI_PARSER_ENTRY ERROR: Unable to include /etc/php-fpm.d/www.conf from /etc/php-fpm.conf at line 1
ERROR: failed to load configuration file '/etc/php-fpm.conf'
ERROR: FPM initialization failed

Also, users also notice the error message below while accessing some web pages:

comments starting with '#' are deprecated in unknown on line 1


Such behavior occurs after upgrading system PHP to 7.x version. PHP 7.x treats prefixes “#” and “;” differently.

This is a Plesk bug that was fixed in Plesk Obsidian version.

Thus the solution that we followed here is to upgrade to Plesk Obsidian. If we are using Plesk Onyx and upgrade to Plesk Obsidian is not possible, then follow the steps given below:

i. Connect to the server via SSH.

ii. Modify the file /etc/php-fpm.d/www.conf:

# vi /etc/php-fpm.d/www.conf

iii. Replace the hash symbols “#” with semicolons “;”

; Default www-pool configuration has been disabled by Plesk Panel.

; Pool configuration was saved in '/etc/php-fpm.d/www.conf.saved_by_psa'.

iv. Save the changes and close the file.


3. ERROR: Unable to set priority for the master process: Permission denied (13)

Sometimes, users notice that the plesk-php73-fpm on the server suddenly stopped working and cannot be started again. When we try to start the service via `/etc/init.d/plesk-php73-fpm`, it failed with the following message in error log:

NOTICE: configuration file /opt/plesk/php/7.3/etc/php-fpm.conf test is successful
ERROR: Unable to set priority for the master process: Permission denied (13)
ERROR: FPM initialization failed

This could trigger due to missing or orphaned php-file in /etc/php/7.0/fpm/pool.d/ or some other folder.

We run the command below initially to run a repair task:

# plesk repair web -php-fpm-configuration

An uninstall plesk-php73-fpm and then reinstall of it often helps to fix the error.


[Need urgent assistance in fixing Plesk errors? We can help you. ]

Who We Are ?

Most prominent, efficient, and well-performing IT companies and software solutions.

Related Posts