Manual:$wgDatabaseReplicaLagWarning

Details
If lag is higher than this value, show a warning in some special pages (like watchlist).