mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-18 18:51:12 +01:00
Suggest "apc.slam_defense" off and "apc.write_lock" on
Summary: Ref T5501. These settings reduce error log noise. Test Plan: Faked into this branch and hit the warning. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5501 Differential Revision: https://secure.phabricator.com/D12319
This commit is contained in:
parent
ffe9c26b00
commit
2a3783cd2c
1 changed files with 23 additions and 0 deletions
|
@ -31,6 +31,29 @@ final class PhabricatorOpcodeCacheSpec extends PhabricatorCacheSpec {
|
|||
$info = apc_cache_info();
|
||||
$this->setUsedMemory($info['mem_size']);
|
||||
|
||||
$write_lock = ini_get('apc.write_lock');
|
||||
$slam_defense = ini_get('apc.slam_defense');
|
||||
|
||||
if (!$write_lock || $slam_defense) {
|
||||
$summary = pht(
|
||||
'Adjust APC settings to quiet unnecessary errors.');
|
||||
|
||||
$message = pht(
|
||||
'Some versions of APC may emit unnecessary errors into the '.
|
||||
'error log under the current APC settings. To resolve this, '.
|
||||
'enable "apc.write_lock" and disable "apc.slam_defense" in '.
|
||||
'your PHP configuration.');
|
||||
|
||||
$this
|
||||
->newIssue('extension.apc.write-lock')
|
||||
->setShortName(pht('Noisy APC'))
|
||||
->setName(pht('APC Has Noisy Configuration'))
|
||||
->setSummary($summary)
|
||||
->setMessage($message)
|
||||
->addPHPConfig('apc.write_lock')
|
||||
->addPHPConfig('apc.slam_defense');
|
||||
}
|
||||
|
||||
$is_dev = PhabricatorEnv::getEnvConfig('phabricator.developer-mode');
|
||||
$is_stat_enabled = ini_get('apc.stat');
|
||||
if ($is_stat_enabled && !$is_dev) {
|
||||
|
|
Loading…
Reference in a new issue