Page MenuHomePhabricator

You have an unresolved setup issue... none left, just 3 ignored
Closed, ResolvedPublic

Description

You have an unresolved setup issue... message is always there, when I click it there are 3 issues left, all ignored. Should this message still exist when there's only ignored left?

last 3 left:

  • Large File Storage Not Configured
  • Alternate File Domain Not Configured
  • PHP Extension "APCu" Not Installed

Daemons all restarted, download/install is less than a week old. Master 3f3626c.

I'll upgrade when I get a chance out of hours.

Event Timeline

StuC updated the task description. (Show Details)
StuC added a subscriber: StuC.

This message should go away when you've ignored everything.

You can hover over the message to get a "title" text popup showing which messages it thinks are still problems.

This is likely an issue related to caching. Fixing the third setup issue (installing APCu) is very likely to fix it, but ideally we should fix it more generally.

"Daemons need restarting"

I have restarted them several times, if I keep hitting a single page it
comes and goes.

OK, will live with it for now as I can't use package manager for APC,
running PHPfarm which probably drops me in the un-supported environments
bracket :)

I have restarted them several times, if I keep hitting a single page it comes and goes.

Yeah, this is definitely a cache issue.

What version of apache/nginx/lighttpd are you using?

Apache 2.2.22(Ubuntu)

on 12.04LTS

When APC/APCu are not available, we fall back to a disk-based cache with worse performance characteristics and much worse cache semantics than APC/APCu provide.

Because the cost to refill this cache is relatively high (we have to run a bunch of CLI stuff to check all your installed versions, and a lot of queries to check your MySQL verison, etc) we try to avoid doing unnecessary cache fills. My guess is that we're too aggressive about this.

If you apply this patch and restart, does the problem vanish?

diff --git a/src/applications/cache/PhabricatorCaches.php b/src/applications/cache/PhabricatorCaches.php
index 5824c64..a8eeb0d 100644
--- a/src/applications/cache/PhabricatorCaches.php
+++ b/src/applications/cache/PhabricatorCaches.php
@@ -229,6 +229,8 @@ final class PhabricatorCaches extends Phobject {
         break;
     }
 
+    $use_ppid = false;
+
     $pid_basis = getmypid();
     if ($use_ppid) {
       if (function_exists('posix_getppid')) {

If so, I'll just remove this "ppid" mechanism and strengthen the APC/APCu warnings to make it clear that you will suffer terrible performance problems if you don't install them.

yes, message has gone. But you say the message was preferable to the
consequences of the possible fix without APC? I'd be interested in knowing
how terrible the consequences are!

But you say the message was preferable to the consequences of the possible fix without APC?

No -- the opposite. I think we should prefer correctness (no message) over performance, and just warn you that APC/APCu are very important for performance.

I'd be interested in knowing how terrible the consequences are!

I expect they're fairly severe in most cases. We have to do a lot of slow stuff in setup.

With APC/APCu, we can do that slow stuff once per webserver restart, on the first request.

Without APC/APCu, we have to do that slow stuff for every webserver process.

OK - so I tried to install apcu into php farm with:
pecl -C ./pear.conf install channel://pecl.php.net/apcu-4.0.2

'make' failed:

On searching it seems apc isn't supported on PHP versions >5.5 and I'm
running 5.6.14
http://serverfault.com/questions/593888/pecl-apc-install-error-make-failed

I don't want to turn this into an installation problem request for help but
have I missed something obvious or are you suggesting I need to install
something I cannot?
(As PHP >5.5 has it's own opcode cache)

APC and APCu are different. Basically:

  • APC is used versions up to 5.5. APC provides an opcode cache and a data cache.
  • APCu is used with 5.5 and newer. APCu provides only a data cache. It is used with Zend Opcache, which provides an opcode cache.

You can visit the "Cache Status" page (ConfigCache Status) for details that are relevant to your setup and installed versions of things.

Zend Opcache does not provide a data cache, which is why we require APCu to be installed alongside it.

We need a data cache to cache the result of running a lot of really slow commands to check your setup (like git --version, hg --version, pygments -H, which, which which, which git, etc.). Doing all these checks takes several seconds. With a data cache, we can run all this stuff on the first request and cache it.

We can't put this stuff in the database because we need to re-run all those checks when you restart your webserver: you may have upgraded Phabricator, you may have changed config, altered $PATH, installed different versions of Git or Mercurial, etc.

Installing APCu on PHPfarm is outside of the scope of our ability to provide support. If you're using PHP 5.6.14, you should install and configure both APCu and Zend OPcache if performance is at all important to your use case.