Last modified: 2008-12-15 23:37:52 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18656, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16656 - cleanupTitles, cleanupImages fail on Wikimedia sites
cleanupTitles, cleanupImages fail on Wikimedia sites
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-15 22:50 UTC by Brion Vibber
Modified: 2008-12-15 23:37 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2008-12-15 22:50:06 UTC
A number of maintenance scripts such as cleanupTitles and cleanupImages currently fail on Wikimedia sites, due to incorrect database connection setup:

$ php maintenance/cleanupTitles.php aawiki
DB connection error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) (localhost)

This ain't good, as it's blocking running of these cleanups...
Comment 1 Brion Vibber 2008-12-15 23:37:52 UTC
Fixed in r44639.

Lots of cleanup scripts are based on the FiveUpgrade class created for the 1.5 schema upgrade -- this provides a utility class designed around pulling data from a second, unbuffered connection, processing it, and stuffing it into a master connection.

Originally, both connections were created by manually instantiating the Database class. This worked as long as $wgDBserver was set, but at some point we apparently stopped setting it in our fancy-ass load-balanced environment where we're exclusively using the $wgDBservers array.
As a result, the connections used the default $wgDBserver of 'localhost' which inconveniently fails on Wikimedia's servers. ;)

Now uses the Tim-approved method of getting a new database connection -- creates a new LoadBalancer via wfGetLBFactory()->newMainLB(), then asks it for a fresh connection.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links