Topic on Project:Support desk

Issue with LocalisationCache

4
ArrakisMiner (talkcontribs)

I seem to be having a little trouble with my LocalisationCache, and I'm not entirely sure why, and how to solve it. Basically, I keep having to run <code>rebuildLocalisationCache.php</code> several times a day. If I don't, I get an error that certain magic words don't exist, and this prevents me from using certain extensions such as ParserFunctions etc as it basically crashes my wiki, throwing an exception. It also means that whenever I add a new extension, I need to run the script or the messages for the extension aren't registered — I'm not entirely sure what's causing this, but this is what I can see from the error log:

[localisation] LocalisationCache using store LCStoreNull
[localisation] LocalisationCache::isExpired(en): cache missing, need to make one
[localisation] LocalisationCache::recache: got localisation for en from source
[DBConnection] Wikimedia\Rdbms\LoadBalancer::reuseConnection: freed connection 0/centralauth
[session] SessionManager using store SqlBagOStuff
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getAnyOpenConnection: found 'foreignFree' connection to #0.
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::open [0s] localhost: SET group_concat_max_len = 262144, sql_mode = ''
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: opened new connection for local/0
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::serverIsReadOnly [0s] localhost: SELECT @@GLOBAL.read_only AS Value
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::getServerVersion [0s] localhost: SELECT  VERSION()     LIMIT 1  
[DBQuery] Wikimedia\Rdbms\DatabaseMysqlBase::fieldInfo [0s] localhost: SELECT * FROM `change_tag` LIMIT 1
[DBQuery] DatabaseUpdater::doCollationUpdate [0s] localhost: SELECT  COUNT(*)  FROM `categorylinks`    WHERE cl_collation != 'uppercase'  LIMIT 1  
[DBQuery] DatabaseUpdater::addField [0s] localhost: SHOW TABLES LIKE 'externallinks'

I assume from this error that the cache keeps expiring, or something of the sort? How can I stop this?

Bawolff (talkcontribs)

The line:

> [localisation] LocalisationCache using store LCStoreNull

Sounds suspicious. What are your caching configs in LocalSettings.php?

ArrakisMiner (talkcontribs)

These are the settings I'm using:

	'wgSessionCacheType' => [
		'default' => CACHE_DB,
	],
	'wgMainCacheType' => [
		'default' => CACHE_ACCEL,
	],
        'wgSharedTables' => [
		'default' => ['objectcache'],
	],

$wgLocalisationCacheConf['storeClass'] = LCStoreCDB::class;
$wgLocalisationCacheConf['storeDirectory'] = '/var/www/html/mw/mediawiki/cache/l10n';
if ( !file_exists( '/var/www/html/mw/mediawiki/cache/l10n/l10n_cache-en.cdb' ) ) {
	$wgLocalisationCacheConf['manualRecache'] = false;
}
Bawolff (talkcontribs)

Delete the last 3 lines (i.e. delete the line starting with if and everything after). Although it is confusing because manualRecache being false should be the default. Are you sure you dont have any additional $wgLocalisationCacheConf settings?

Also verify that the cache directory and files in it are writable by the webserver.

Reply to "Issue with LocalisationCache"