{"record":{"id":"7b3fc51df020bfee","repo":"phacility/phabricator","slug":"all-of-the-configured-fulltext-search-services-fai","errorCode":null,"errorMessage":"All of the configured Fulltext Search services failed.","messagePattern":"All of the configured Fulltext Search services failed\\.","errorType":"exception","errorClass":"PhutilAggregateException","httpStatus":null,"severity":"error","filePath":"src/infrastructure/cluster/search/PhabricatorSearchService.php","lineNumber":276,"sourceCode":"      }\n\n      try {\n        $engine = $service->getEngine();\n        $phids = $engine->executeSearch($query);\n\n        return id(new PhabricatorFulltextResultSet())\n          ->setPHIDs($phids)\n          ->setFulltextTokens($engine->getFulltextTokens());\n      } catch (PhutilSearchQueryCompilerSyntaxException $ex) {\n        // If there's a query compilation error, return it directly to the\n        // user: they issued a query with bad syntax.\n        throw $ex;\n      } catch (Exception $ex) {\n        $exceptions[] = $ex;\n      }\n    }\n    $msg = pht('All of the configured Fulltext Search services failed.');\n    throw new PhutilAggregateException($msg, $exceptions);\n  }\n\n}\n","sourceCodeStart":258,"sourceCodeEnd":280,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/infrastructure/cluster/search/PhabricatorSearchService.php#L258-L280","documentation":"PhabricatorSearchService::newResultSet() tries each readable search service in turn and aggregates failures; if every readable service throws, it wraps the collected exceptions in a PhutilAggregateException with this message. Note that query-syntax errors (PhutilSearchQueryCompilerSyntaxException) are rethrown directly to the user and never reach this path — this error strictly means backend failure.","triggerScenarios":"Executing a full-text search when all configured backends fail: Elasticsearch cluster down or unreachable, index deleted, authentication failures, or MySQL fulltext unavailable. Any single healthy readable service prevents the throw.","commonSituations":"Search outage during maintenance; all replicas marked read=false so only one backend serves reads and it fails; index deleted or recreated empty with a version mismatch.","solutions":["Catch PhutilAggregateException and inspect `$ex->getExceptions()` — the first cause usually identifies the failing backend and reason.","Restore backend availability (service up, index exists, `version`/`protocol`/`path` correct in `cluster.search`).","Add a second readable service (e.g. MySQL fulltext) so a single backend failure cannot take search down.","Run `bin/search status` to verify hosts report healthy."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  $result_set = PhabricatorSearchService::newResultSet($query);\n} catch (PhutilSearchQueryCompilerSyntaxException $ex) {\n  // user syntax problem: surface directly\n  throw $ex;\n} catch (PhutilAggregateException $ex) {\n  // all backends down: degrade, do not white-screen search pages\n  foreach ($ex->getExceptions() as $cause) {\n    phlog('search backend failure: '.$cause->getMessage());\n  }\n  return new PhabricatorFulltextResultSet()\n    ->setPHIDs(array())\n    ->setFulltextTokens(array());\n}","preventionTips":["Run at least two readable search services (e.g. MySQL fulltext beside Elasticsearch) so aggregation has a survivor.","Alert on search health failure counts (`bin/search status`) so operators see degradation before total outage.","Distinguish syntax errors from availability errors in handlers — only the latter belong in this catch."],"tags":["php","phabricator","search","cluster","fulltext","elasticsearch"],"backgroundTag":"search-service-unavailable","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}