Talk:PoolCounter

About this board

PoolCounter warnings/errors on MW.1.35

4
Summary by Krinkle

"poolcounter should run as a standalone service"

S0ring (talkcontribs)

With the installed software

Software Version
MediaWiki 1.35.3
Pool Counter Client – (e1d5b5c)13:57, 13. Jul. 2020

the following warnings/errors occur:

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/extensions/PoolCounter/includes/PoolCounter_ConnectionManager.php on line 23

Warning: Invalid argument supplied for foreach() in /var/www/html/extensions/PoolCounter/includes/PoolCounter_ConnectionManager.php on line 34

Notice: Undefined variable: hostName in /var/www/html/extensions/PoolCounter/includes/PoolCounter_ConnectionManager.php on line 59


Would this indicate a php compability issue?

Legoktm (talkcontribs)

What's your PoolCounter configuration?

S0ring (talkcontribs)

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

S0ring (talkcontribs)

My bad, I misunderstood the setup in this case, poolcounter should run as a standalone service/daemon which in my case it didn't.

consistent hashing vs. primary-secondary server nodes

3
Adamw (talkcontribs)

I noticed that most of WMF's PoolCounter clients are set up to use a single server, and we were recommended to configure our client to use a primary server, then fallback to a secondary server if needed. This contradicts the documentation here for the servers variable, which mentions consistent hashing.

What is the preferred client implementation, primary with a fallback or consistent hashing across the two servers?

Legoktm (talkcontribs)
Adamw (talkcontribs)

Great, thanks for looking! I never should have doubted the documentation ;-)

Is it possible to limit CirrusSearch with redis instead of the C poolcounterd?

2
Deletedaccount4567435 (talkcontribs)

The server side poolcounterd software were extremely poor documented. It can be build by dpkg-buildpackage under some version of Debian, but mostly not.

Is it possible to limit CirrusSearch by redis instead of the C poolcounterd?

error messages:

Failing Scenarios:

cucumber features/simulation.feature:2 # Scenario: Just readers

cucumber features/simulation.feature:12 # Scenario: Just search with per user locks

cucumber features/simulation.feature:17 # Scenario: Search and readers

77 scenarios (3 failed, 74 passed)

575 steps (3 failed, 572 passed)

Ciencia Al Poder (talkcontribs)

It should, this extension apparently doesn't provide anything more than using pool counter with the C poolcounterd daemon instead of the redis one.

Does the poolcounter server exist in Wikipedia-APT?

4
Deletedaccount4567435 (talkcontribs)

apt-get install poolcounter

Reading package lists... Done

Building dependency tree

Reading state information... Done

E: Unable to locate package poolcounter

Legoktm (talkcontribs)

Sorry, didn't see this until now. What do you mean by "Wikipedia-APT"?

Deletedaccount4567435 (talkcontribs)
Krinkle (talkcontribs)

The PoolCounter server is available through the standard Debian and Ubuntu repositories. You don't need to add Wikimedia's APT repository as source.

See packages.debian.org and packages.ubuntu.com.

It is possible that the specific Debian version you are/were on did not yet have it, but as of 2023 it is available for all current LTS releases. I've added links these links to PoolCounter page.

Friendly reminder to people who just/going to upgrade to MW1.28

2
Summary by Legoktm

Documentation updated

Deletedaccount4567435 (talkcontribs)

Somebody truncate the PoolCounter.php file into empty, and failed to update the extension description page. (which I got it updated.)

It's now load through wfLoadExtension( 'PoolCounter' );

You will get PoolCounter_Client class not exist error if you stick with the old require_once method.

Legoktm (talkcontribs)

Thank you for updating the documentation!

There are no older topics