Incident Library

IL-0216 Wikimedia Foundation · 2023-09-20database

Wikimedia on-wiki search was slow or rejected after a datacenter switchover overloaded one Elasticsearch node in codfw

Wikimedia's on-wiki search runs on Elasticsearch through CirrusSearch. During the switchover of the primary datacenter to codfw, more_like queries were expected to be routed to eqiad, the non-primary datacenter, but went to codfw instead, apparently because RESTBase sent these requests as POST rather than GET, which forces routing to the primary datacenter. The CirrusSearch cache hit rate fell from 71.6% to 55.5%, response times grew, and the PoolCounter rejected up to 25% of queries. Six responders troubleshot after a ping in #wikimedia-search; at 14:26 Grafana showed extremely high load on elastic2044, the node was banned from the cluster, latency began to return to normal, and by 14:35 the PoolCounter rejections were at zero. It is not certain whether the ban or the cluster healing by itself ended the incident. One responder theorised that two enwiki shards may have been on the same host, which is very expensive with more_like queries, so the switchover may have worsened the problem rather than caused it directly.

Severity
–
Scope
On-wiki search for all wikis delayed or unavailable for a subset of end users; up to 25% of search queries rejected by the PoolCounter at the peak
Users affected
a subset of end users of all Wikimedia wikis
Region
codfw datacenter
Time to detect
6m
Time to resolve
24m

Symptoms

Right after the primary datacenter was switched from EQIAD to CODFW at 14:00 UTC on 20 September 2023, on-wiki search on all Wikimedia wikis became delayed or unavailable for a subset of users. At 14:08 the alert "CirrusSearch codfw 95th percentile latency - more_like" fired and reached IRC and the Search Platform email list as "PROBLEM alert - graphite1005/CirrusSearch codfw 95th percentile latency - more_like is CRITICAL".

The PoolCounter rejected a share of search queries, up to 25% at the peak, for about half an hour. The rejections came from long response times, made worse by an unexpected fall in the cache hit rate from 71.6% to 55.5%. The more_like queries had been expected to go to eqiad, the non-primary datacenter, but were reaching codfw. At 14:26 Grafana showed extremely high load on one Elasticsearch node, elastic2044. After that node was banned from the cluster, latency began to return to normal, and at 14:35 the PoolCounter rejections were at zero.

Symptom High latencyHigh error rateLoad imbalanceMisrouted requests

Root cause

Trigger
At 14:00 UTC the primary datacenter was switched from EQIAD to CODFW. more_like queries that were expected to go to eqiad, the non-primary datacenter, went to codfw instead, apparently because RESTBase sent them as POST rather than GET.

Detection

Automated monitoring caught the problem, but not quickly enough to prevent user-facing impact: the Grafana alert "CirrusSearch codfw 95th percentile latency - more_like" went to IRC and the Search Platform email list at 14:08. No one was paged; SREs were already watching closely because of the datacenter switchover. At 14:14 Hashar pinged #wikimedia-search and engineers began troubleshooting.

Remediation

Action items

Lessons

Monitoring caught the problem, but not quickly enough to prevent user-facing impact. The heightened attention during the switchover meant the impact was recognised immediately, and banning a single node was quick and easy. The mitigation was not guided by an existing runbook, and the shards on the overloaded host were not checked before it was banned.

Sources

References

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, Elasticsearch or OpenSearch, In-memory cache among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.