Matomo Server Stopped Allowing New Connections?

Hello Everyone,

I just setup a new dedicated server and decided to setup a brand new Matomo On-site server and switch all my sites over from the ‘proxy script’ to the default tracking script for several reasons that are irrelevant.

My first (roughly) 90 websites found and connected to my Matomo server just fine using all default settings for the WP-Matomo Integration plugin. All of my websites are Wordpress sites.

The last 25 websites I’ve tried to add have all failed with this error message:

WP-Matomo 1.0.23 was not able to connect to Matomo using your configuration

Firstly, the plugin is at version 1.0.24 so there’s a small issue there.
I have flushed all caches in server, website, browser and rebooted the server several times, tried fresh installs of the plugin, disabled all protection in Cloudflare to test and still no luck.

I enabled WP-Debug and got the following output on a fresh failure of WP-Matomo:

Notice: Undefined offset: 114 in /home/runcloud/webapps/sample-website/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 140

Notice: Trying to access array offset on value of type null in /home/runcloud/webapps/sample-website/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 140

Notice: Undefined offset: 114 in /home/runcloud/webapps/sample-website/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 140

Notice: Trying to access array offset on value of type null in /home/runcloud/webapps/sample-website/wp-content/plugins/wp-piwik/classes/WP_Piwik/Admin/Settings.php on line 140

The “Undefined offset: 114” is the SiteID that isn’t getting passed to the Matomo server. Why would this happen after 90+ successful additions but now I can’t get 1 site to succeed?

I’m not much of a programmer, but thought I’d run this by the Gurus in here and see if anyone has any ideas?

TIA
James

Hi,

This is the line that fails:

Honestly, the person that most likely has a guess, what could be going wrong is @WP_PiwikDev

Hi Lukas,

Thanks for the reply. I think the issue is above line 140 with $piwikSiteList

If I unckeck auto config in WP-Matomo, the site list populates with the first 90 sites that installed without error and none of the sites that have failed ever find their way to the populated list.

The question is, what or why would Matomo server be blocking the plugin which is passing the correct Matomo URL + Auth Token but the server isn’t responding to populate the new list of sites.

The problem may have started after updating from 4.0.5 to 4.1.0 but I was working on other “new server” issues and wasn’t paying attention to that, but remember updating fairly recently.

Thanks
James

I tried to downgrade to 4.0.5 to see if that would fix my issue, but once I copied the 4.0.5 files over the 4.1 files I got a database already upgraded error message with no option to downgrade, so that’s a ‘no go’.

Did you try to set filter_limit to a higher value or to -1 to fetch unlimited sites?

If you configure your sites manually, and you have more than 100 sites in your Matomo instance, the selection list will only contain the first 100 entries because of Matomo’s default filter limitations on API results.

See this thread in the WordPress forums: https://wordpress.org/support/topic/plugin-only-get-top-100-items/

Hello WP_PiwikDev,

I edited my config.ini.php file and added filter_limit=-1 under [General] but still have the same problem.

I’d been having problems running the “proxy script” for more than 1.5 years and decided to just start over from scratch. I have setup every website by hand manually, before trying to connect the plugin.

Matomo server had around 90 something (definitely low 90’s) when it quit accepting new websites. I think it was around the time 4.1.0 was released and I updated (stupid because everything was working great).

In this image you can see WP-Piwik plugin is connecting, finding what version of WP I’m running, reporting the wrong version of the plugin, and failing to assign the “Undefined offset:” described above which is the SiteID that’s getting lost for some reason:

This screenshot was taken after I added the “filter_limit=-1” to my config file, but this is what it’s been doing consistently for the last 45 websites. It seems pretty black and white. It worked flawlessly (not 1 error) adding the first 90 sites, then failed consistently for the last 45.

With the “proxy script” the “Determined site:” was always set to website with siteID=1, so the empty brackets () is new.

Thanks,
James

Hi,

If I understand

Finally, it’s done. 1.0.22 offers an expert option to set filter_limit on your own. Choose -1 to fetch unlimited entries.

correctly, there should be an expert setting in the wordpress plugin that you need to edit.

1 Like

Hi Lukas,

Boy do I feel stupid :flushed:
But thank you so much for chiming in to give me a clue. That gave me the full site list as expected.

In case there’s anyone more dense than me, Go to the “Expert Settings” tab in the WP-Piwik plugin, find the “Filter limit:” field, enter -1 and save settings. You should now have a fully populated site list.

I owe you both a beer Lukas & WP_PiwikDev :+1:
Thank you

2 Likes