Page MenuHomePhabricator

Reduce connections opened by mediawiki
Open, MediumPublic

Description

Looking at connections opened in a typical request (e.g. logged out view of a page from ParserCache). I see a lot of connections being opened (around twenty). Looking at processlist of any replicas also show a lot of "sleeping" connections doing nothing. I also have seen connections being opened and closed without doing anything a lot.

This clearly needs fixing.

Suggested approaches:

  • Phase out ILoadBalancer::getConnectionRef in favour of ILoadBalancer::getLazyConnectionRef (T255493)
  • Make maintenance scripts close connections after querying.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ladsgroup triaged this task as Medium priority.Mar 2 2022, 2:46 PM
Ladsgroup moved this task from Triage to In progress on the DBA board.

Change 769422 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/core@master] WikiPage: Use LinkCache in ::pageData()

https://gerrit.wikimedia.org/r/769422

Change 769425 had a related patch set uploaded (by Ladsgroup; author: Amir Sarabadani):

[mediawiki/extensions/FlaggedRevs@master] Add APCu cache in FlaggableWikiPage::pageData()

https://gerrit.wikimedia.org/r/769425

Change 769425 merged by jenkins-bot:

[mediawiki/extensions/FlaggedRevs@master] Add APCu cache in FlaggableWikiPage::pageData()

https://gerrit.wikimedia.org/r/769425

Change 769422 abandoned by Ladsgroup:

[mediawiki/core@master] WikiPage: Use LinkCache in ::pageData()

Reason:

Done in T206498

https://gerrit.wikimedia.org/r/769422