@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

If daemon running-as-user setup check fails its query, don't bother with it

Summary:
See <https://discourse.phabricator-community.org/t/upgrade-from-sep-30-2016/3702/>. A user performing an upgrade from 2016 to 2020 ran into an issue where this setup query is overheating.

This is likely caused by too many rows changing state during query execution, but the particulars aren't important since this setup check isn't too critical and will catch the issue eventually. It's fine to just move on if this query fails for any reason.

Test Plan: Forced the query to overheat, loaded setup issues, got overheating fatal. Applied patch, no more fatal.

Differential Revision: https://secure.phabricator.com/D21057

+11 -4
+11 -4
src/applications/config/check/PhabricatorDaemonsSetupCheck.php
··· 48 48 49 49 $expect_user = PhabricatorEnv::getEnvConfig('phd.user'); 50 50 if (strlen($expect_user)) { 51 - $all_daemons = id(new PhabricatorDaemonLogQuery()) 52 - ->setViewer(PhabricatorUser::getOmnipotentUser()) 53 - ->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE) 54 - ->execute(); 51 + 52 + try { 53 + $all_daemons = id(new PhabricatorDaemonLogQuery()) 54 + ->setViewer(PhabricatorUser::getOmnipotentUser()) 55 + ->withStatus(PhabricatorDaemonLogQuery::STATUS_ALIVE) 56 + ->execute(); 57 + } catch (Exception $ex) { 58 + // If this query fails for some reason, just skip this check. 59 + $all_daemons = array(); 60 + } 61 + 55 62 foreach ($all_daemons as $daemon) { 56 63 $actual_user = $daemon->getRunningAsUser(); 57 64 if ($actual_user == $expect_user) {