Page MenuHomePhabricator

D12319.id29600.diff
No OneTemporary

D12319.id29600.diff

diff --git a/src/applications/cache/spec/PhabricatorOpcodeCacheSpec.php b/src/applications/cache/spec/PhabricatorOpcodeCacheSpec.php
--- a/src/applications/cache/spec/PhabricatorOpcodeCacheSpec.php
+++ b/src/applications/cache/spec/PhabricatorOpcodeCacheSpec.php
@@ -31,6 +31,29 @@
$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) {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 12, 7:14 AM (1 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714578
Default Alt Text
D12319.id29600.diff (1 KB)

Event Timeline