Toolserver:Replication lag

From MediaWiki.org
Jump to: navigation, search
Wikimedia Community Logo-Toolserver.svg

This page was moved from the Toolserver wiki.
Probably, it's only of historical interest. Please help by updating links, template links, etc. If it's still relevant, move this page to a normal title and leave a redirect.

Replication lag or replag is the delay between data appearing on Wikimedia servers (like an edit), and that data appearing in the Toolserver databases. This delay occurs because Toolserver tools do not access the Wikimedia databases directly; instead, they access copies of those databases, replicated in real-time. Each update to the live database is logged, and the Toolserver databases follow this log to make the same updates.

Replication lag can be dramatically worsened by database crashes, expensive queries, and software or hardware issues.

Determine current lag[edit]

For the current (Tool Labs) information, see wikitech:Help:Tool Labs/Database#Identifying lag.

Determining lag by wiki[edit]

To determine how much lag is affecting a specific wiki's database, find out what server it is on using the wiki server assignments table, then use the above methods to find out how much lag is affecting that server.

/* Use recentchanges table of the most frequently updated wiki */
SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(MAX(rc_timestamp)) FROM recentchanges;

See also[edit]

Category:Database