• Resolved adrianww

    (@adrianww)


    Hi there – we have been using Matomo on a couple of our sites for a while with no problems but since the most recent update, it appears to be causing a fatal crash of the whole WordPress stack, leading to Internal Server Errors and taking the sites offline. We first spotted this when cloning a current live site into a development environment for some forthcoming changes and the dev environment immediately fell over. The live environment seemed OK, but when the Matomo plugin was updated a little later, that site also crashed.

    We had to remove the matomo plugin files manually (via FTP) to get the sites back up.

    I’ve since tried to install Matomo on a third site (dev environment) to try to figure out what’s going wrong and the install won’t even complete – it just fails every time.

    The live environment is running under PHP 8.0, the dev environments under PHP 8.1.

    I’ve taken a quick look through the posts here and can’t see anything like this mentioned so far.

    The error in the dev environment following the clone operation (as reported in the WordPress error email) was:

    An error of type E_ERROR was caused in line 36 of the file /home/agw_thsxec/dev-ruthclayton.glendrian.com/wp-content/plugins/matomo/shared.php. Error message: Uncaught Error: Failed opening required '/home/agw_thsxec/dev-ruthclayton.glendrian.com/wp-content/plugins/matomo/classes/WpMatomo/Paths.php' (include_path='.:') in /home/agw_thsxec/dev-ruthclayton.glendrian.com/wp-content/plugins/matomo/shared.php:36

    (It looks like this may have been due to a fault during the clone operation? Unfortunately, I can’t check whether the missing file was actually there, as I had to delete the matomo plugin files to get the site back up.)

    The error in the live environment (again, as reported in the automatic WordPress crash email) was:

    An error of type E_ERROR was caused in line 245 of the file /homepages/27/d4296089782/htdocs/wordpress/wp-content/plugins/matomo/app/bootstrap.php. Error message: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /homepages/27/d4296089782/htdocs/wordpress/wp-content/plugins/matomo/app/bootstrap.php:245

    The error when trying to install into the other dev environment for testing is:

    Installation failed: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> 500 Internal Server Error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log.

    There’s nothing showing up in the server error log for any of them.

    Sorry I don’t have anything more specific but has anyone seen anything similar in the last 24 hours or so with the latest version of the Matomo plugin? Are there any known issues?

    • This topic was modified 1 year, 9 months ago by adrianww.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter adrianww

    (@adrianww)

    OK, been doing some more testing here.

    The failed installations/updates seemed to be if using the WordPress repository. If I download the .zip file from Matomo and install the plugin that way, everything seems to work.

    Having done that, I then uninstalled Matomo and reinstalled from the WP repository and this now worked as well.

    Whether there was something funny going on with the connection between my sites and the repository or whether I was getting some kind of corrupted version of what was in the repository I don’t know but, hopefully, things seem to have resolved themselves.

    I’ll leave this open for another 24-48 hours in case the issue reappears but if everything seems to be back on the level, I’ll mark it as resolved.

    Maybe it’s just been one of those days…

    Plugin Support emermatomo

    (@emermatomo)

    Hello @adrianww We’re glad to hear that reinstalling it fixed the issue. If you encounter the issue again, please let us know.

    Thread Starter adrianww

    (@adrianww)

    Well…funnily enough…

    Just tried reinstalling Matomo on the other dev environment I’m working with and it failed again. This was trying to install Matomo via the WordPress repository again (selecting Install Now from the list when you do Add New plugin in the WordPress admin panel). The install button in the UI changed to “Update Failed” and I got the same error message as above (500 Internal Server Error for the install, although the site and admin dashboard are both still up and responding). The server error logs show:

    [Wed Mar 01 04:16:07.559724 2023] [fcgid:warn] [pid 149450:tid 118689398527744] [client 146.90.240.164:61885] mod_fcgid: read data timeout in 120 seconds, referer: https://www.dev-ruthclayton.glendrian.com/wp-admin/plugin-install.php?s=matomo&tab=search&type=term
    [Wed Mar 01 04:16:07.559901 2023] [core:error] [pid 149450:tid 118689398527744] [client 146.90.240.164:61885] End of script output before headers: admin-ajax.php, referer: https://www.dev-ruthclayton.glendrian.com/wp-admin/plugin-install.php?s=matomo&tab=search&type=term

    Once again, installing from the .zip file seems to work – it’s running installs or updates from the WordPress repository that seems to fail.

    If it was just the installations on the dev sites failing, I’d have said that it looks like an issue with the connection between the dev host and the WordPress repository, but it also happened when trying to update the existing Matomo installation on the live site, which is hosted with a different company altogether. Dev sites are with Dreamhost in the US, live site is with Fasthosts in the UK.

    Any suggestions?

    Thread Starter adrianww

    (@adrianww)

    OK, so having had the pleasure (!!) of trying to track down this problem for the last couple of days, I now have a better picture.

    The reason that the install or update from the WordPress repository was failing was that the installation/update process on the affected sites was taking so long that it was hitting a PHP spawned process timeout while running. Why the install or update now seems to be so slow I don’t know – I’ve installed Matomo several times on various sites and it has been updating with no problems. It only seems to be since the last update that the installation/update process has become so slow that it runs up against process time limits.

    (As an aside, something similar seems to be happening with the most recent update to Woocommerce too. Again, multiple sites on different hosting providers.)

    Anyway, I don’t know whether it’s something in the install package itself or something in the way in which the WordPress repository is delivering it to the target sites. But, whichever it is, it means that installations or updates from the repository fail, while installations directly from an uploaded .zip file don’t.

    Given that a .zip file which is downloaded manually from www.ads-software.com then uploaded to the sites works fine, but the install/update from the WordPress repository runs so slowly as to cause these issues, is it possible that there is some kind of problem with the way in which the repository is delivering the plugin to the sites?

    Plugin Support emermatomo

    (@emermatomo)

    Hello @adrianww

    We are sorry to hear about the error you are getting.

    This usually happens when the plugin files are cached and some old files are still used after updating the plugin. On occasions, this causes temporary errors that resolve themselves once the cache has been cleared.

    If the problem doesn’t resolve for you automatically, can you please try clearing the cache from your theme, plugin, server and CDN (e.g. CloudFlare)? If you are not sure how to clear the cache from a theme or plugin please speak to those authors. If you want to clear cache from the server, please speak to your host provider.

    Please let us know the results.

    Thread Starter adrianww

    (@adrianww)

    Hi again,

    It’s OK for now as I’ve got everything up to date. I had the option to change some settings so that the PHP process timeout no longer interrupted the installs or updates. I’m pretty sure that caching wasn’t causing the problem and it was purely the length of time it was taking the repository to deliver the update that caused things to break. Not sure why it was taking so long – could be some routing snafu between www.ads-software.com and the host server or who knows what.

    In any case, if I run into it again, I know what it is and can work around it. If I do start seeing it regularly, I’ll investigate further on the network/connectivity side I think.

    Thanks!

    Plugin Support emermatomo

    (@emermatomo)

    Hello @adrianww glad to hear that everything is working now on your end. If you need further assistance, please don’t hesitate to reach out.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Matomo Install/Update failing, crashing sites’ is closed to new replies.