Page MenuHomePhabricator

Zoomviewer uses persitent db connections
Closed, ResolvedPublic

Description

From /data/project/zoomviewer/public_html/index.php

$db = mysqli_connect("p:commonswiki.labsdb", $ts_mycnf['user'], $ts_mycnf['password'], "commonswiki_p");

From https://www.php.net/mysqli_connect:

Prepending host by p: opens a persistent connection.

From https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Connection_handling_policy:

Usage of connection pools (maintaining open connections without them being in use), persistent connections, or any kind of connection pattern that maintains several connections open even if they are unused is not permitted on shared MySQL instances (Wiki Replicas and ToolsDB).

Event Timeline

Removing the p: should be relatively easy. This would be a great time to switch to the "new" (~3 years old) naming convention for the wiki replicas as well. That would mean replacing "commonswiki.labsdb" with "commonswiki.web.db.svc.eqiad.wmflabs".

bd808 assigned this task to dschwen.