Below is the configuration, but the warnings/errors occur when $wgPoolCountClientConf
is enabled only.
wfLoadExtension( 'PoolCounter' );
// Configuration for standard searches.
$wgPoolCounterConf[ 'CirrusSearch-Search' ] = [
'class' => 'PoolCounter_Client',
'timeout' => 30,
'workers' => 25,
'maxqueue' => 50,
];
// Configuration for prefix searches. These are usually quite quick and
// plentiful.
$wgPoolCounterConf[ 'CirrusSearch-Prefix' ] = [
'class' => 'PoolCounter_Client',
'timeout' => 10,
'workers' => 50,
'maxqueue' => 100,
];
// Configuration for regex searches. These are slow and use lots of resources
// so we only allow a few at a time.
$wgPoolCounterConf[ 'CirrusSearch-Regex' ] = [
'class' => 'PoolCounter_Client',
'timeout' => 30,
'workers' => 10,
'maxqueue' => 10,
];
// Configuration for funky namespace lookups. These should be reasonably fast
// and reasonably rare.
$wgPoolCounterConf[ 'CirrusSearch-NamespaceLookup' ] = [
'class' => 'PoolCounter_Client',
'timeout' => 10,
'workers' => 20,
'maxqueue' => 20,
];
$wgPoolCountClientConf = [
'servers' => "127.0.0.1:8003",
'timeout' => 0.5
];
I enabled it in order to avoid the error:
mediawiki [poolcounter] Pool key 'CirrusSearch-Search:_elasticsearch' (CirrusSearch-Search): Error connecting to pool counter server 127.0.0.1: Connection refused