add possibility to specify pm-related settings per php-config (if override of fpm-daemon settings is set to yes), fixes #573

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-09-28 10:55:08 +02:00
parent 108c4c25b3
commit 6c7ee0c222
9 changed files with 295 additions and 14 deletions

View File

@@ -91,6 +91,18 @@ class phpinterface_fpm
$fh = @fopen($this->getConfigFile(), 'w');
if ($fh) {
if ($phpconfig['override_fpmconfig'] == 1) {
$this->_fpm_cfg['pm'] = $phpconfig['pm'];
$this->_fpm_cfg['max_children'] = $phpconfig['max_children'];
$this->_fpm_cfg['start_servers'] = $phpconfig['start_servers'];
$this->_fpm_cfg['min_spare_servers'] = $phpconfig['min_spare_servers'];
$this->_fpm_cfg['max_spare_servers'] = $phpconfig['max_spare_servers'];
$this->_fpm_cfg['max_requests'] = $phpconfig['max_requests'];
$this->_fpm_cfg['idle_timeout'] = $phpconfig['idle_timeout'];
$this->_fpm_cfg['limit_extensions'] = $phpconfig['limit_extensions'];
}
$fpm_pm = $this->_fpm_cfg['pm'];
$fpm_children = (int) $this->_fpm_cfg['max_children'];
$fpm_start_servers = (int) $this->_fpm_cfg['start_servers'];