added possibility to enable slowlog for fpm-users in the php-config (domain based logs), fixes #1051

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-12-03 11:14:32 +01:00
parent 64137f68a8
commit 2853d6e1a4
9 changed files with 143 additions and 10 deletions

View File

@@ -162,6 +162,16 @@ class phpinterface_fpm {
}
$fpm_config.= 'pm.max_requests = '.$fpm_requests."\n";
// possible slowlog configs
if ($phpconfig['fpm_slowlog'] == '1') {
$fpm_config.= 'request_terminate_timeout = ' . $phpconfig['fpm_reqterm'] . "\n";
$fpm_config.= 'request_slowlog_timeout = ' . $phpconfig['fpm_reqslow'] . "\n";
$slowlog = makeCorrectFile($this->_settings['system']['logfiles_directory'] . '/' . $this->_domain['loginname'] . '-php-slow.log');
$fpm_config.= 'slowlog = ' . $slowlog . "\n";
$fpm_config.= 'catch_workers_output = yes' . "\n";
}
$fpm_config.= ';chroot = '.makeCorrectDir($this->_domain['documentroot'])."\n";
$tmpdir = makeCorrectDir($this->_settings['phpfpm']['tmpdir'] . '/' . $this->_domain['loginname'] . '/');