Toolserver:Replication lag
This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it 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
editFor the current (Tool Labs) information, see wikitech:Help:Tool Labs/Database#Identifying lag.
Determining lag by wiki
editTo 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;