• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Customize [global] section of /system/domain/etc/php-fpm.conf

enerspace

Basic Pleskian
Hello,

unfortunately I have not found anything yet. Maybe someone can help us here?

Regularly our customizations for PHP-FPM (to increase the stability of PHP-FPM) were done in the following file under [global] section: /opt/plesk/php/7.4/etc/php-fpm.conf.

For example, the setting: emergency_restart_threshold or process_control_timeout.

Since the function dedicated php-fpm exists, our modifications do not work anymore. How can we add our own customizations to PHP-FPM in dedicated mode? The new file is located under the following folder: /var/www/vhosts/system/DOMAIN/etc/php-fpm.conf

Thank you very much for your answers.
 
@IgorG yes!

I want to customize the [global] section and not the PHP-FPM pool settings.

Here is the entire file that is generated by Plesk and cannot be edited in [global]:

Code:
; ATTENTION!
;
; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
; SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.

; If you need to customize this file, use either custom PHP settings tab in
; Panel or override settings in /var/www/vhosts/system/XXX/conf/php.ini.
; To override pool configuration options, specify them in [php-fpm-pool-settings]
; section of /var/www/vhosts/system/XXX/conf/php.ini file.

[global]
error_log = /var/www/vhosts/system/XXX/logs/php-fpm_error.log
log_level = warning

############## EDIT THIS SECTION ##############

[XXXX]
; Don't override following options, they are relied upon by Plesk internally
prefix = /var/www/vhosts/system/$pool
user = XXXX
group = psacln

listen = php-fpm.sock
listen.owner = root
listen.group = psaserv
listen.mode = 0660

; Following options can be overridden
chdir = /

; If php_value[error_log] is not defined, worker errors will be sent to
; web server and main php-fpm error log
catch_workers_output = yes

; php.ini custom configuration directives
php_value[date.timezone] = "Europe/Berlin"
php_value[default_charset] = "UTF-8"
php_value[disable_functions] = ""
php_value[error_reporting] = 22519
php_value[max_execution_time] = 600
php_value[max_input_time] = 600
php_value[max_input_vars] = 5000
php_value[memory_limit] = 1024M
php_value[open_basedir] = "/var/www/vhosts/XXXX/:/tmp/:/usr/bin"
php_value[post_max_size] = 64M
php_value[upload_max_filesize] = 64M

; Following directives define pool configuration
#######################
ONLY THIS SECTION CAN BE EDITED WITH php.ini or Plesk Panel under /var/www/vhosts/system/XXX/etc
#######################
pm = ondemand
pm.max_children = 150
pm.max_requests = 0
pm.max_spare_servers = 1
pm.min_spare_servers = 1
pm.process_idle_timeout = 10s
pm.start_servers = 1
 
The old system had a Global file that could be customized: /opt/plesk/php/8.0/etc/php-fpm.conf In this file the automatically generated files from Plesk were included via: include=/opt/plesk/php/8.0/etc/php-fpm.d/*.conf
 
I see on my test server:

# plesk version
Product version: Plesk Obsidian 18.0.42.1
OS version: CentOS 7.9.2009 x86_64
Build date: 2022/03/14 17:00

# grep ATTENTION /opt/plesk/php/8.0/etc/php-fpm.conf
# grep php-fpm.d /opt/plesk/php/8.0/etc/php-fpm.conf
; include=/opt/plesk/php/8.0/etc/php-fpm.d/*.conf
; See /opt/plesk/php/8.0/etc/php-fpm.d/*.conf
include=/opt/plesk/php/8.0/etc/php-fpm.d/*.conf

As you can see there is no ATTENTION... and there is php-fpm.d/*.conf include.
What are your OS and Plesk versions?
 
This file is not the issue. The file located at /opt/plesk/php/7.4/etc/php-fpm.conf is only interesting for the old FPM handler.

The problem occurs with the Dedicated FPM Handler:
1648745592205.png

The configuration is not here: /opt/plesk/php/7.4/etc/php-fpm.conf. The new configuration is stored here: /var/www/vhosts/system/DOMAIN/etc/php-fpm.conf.

The problem is, this file is automatically generated and therefore cannot be edited. We cannot change any settings under [GLOBAL] in the file: /var/www/vhosts/system/DOMAIN/etc/php-fpm.conf for the dedicated fpm handler.
 
Back
Top