DevDavido / performance-audit-plugin

Daily performance audits of all your sites in Matomo.
GNU General Public License v3.0
12 stars 4 forks source link

PerformanceAudit - Functions deprecated #42

Closed nicoco59 closed 1 year ago

nicoco59 commented 1 year ago

Hi,

I'm currently using Matomo 4.13.1 and I'm having an issue while enabling the plugin, it seems to prevent the cron tasks to work properly, here is the error when I navigate to the "Plugin check" section :

WARNING: /plugins/PerformanceAudit/vendor/symfony/process/Process.php(612): Deprecated - Return type of Symfony\Component\Process\Process::getIterator($flags = 0) should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice - Matomo 4.13.1 - Please report this message in the Matomo forums: https://forum.matomo.org/ (please do a search first as it might have been reported already) (Module: PerformanceAudit, Action: pluginCheck, In CLI mode: false)

Did someone run into this issue before ? How to solve it ?

Thanks.

DevDavido commented 1 year ago

Hi @nicoco59,

What PHP version do you use? What NPM version? Are all requirements installed? Do you have PHP error logs with a stack trace of that deprecation warning or other errors?

That warning itself occurs since PHP 8.1 is available. Please note that this plugin has not been tested (yet) with PHP 8 and above due to limited time, but feel free to open up a PR.

Which cron tasks are you referring to? Do you mean the scheduled tasks from Matomo? Or the cron jobs from your OS? Does deactivating this plugin resolve the cron tasks issue? How many sites do you monitor with Matomo? How many pages does each site contain on average?

With more information it's clearer to find the underlying issue.

nicoco59 commented 1 year ago

Hi @DevDavido , here's my server's configuration and details :

DevDavido commented 1 year ago

Thanks for the information @nicoco59. What are the server specs (CPU, RAM) you're running Matomo on? Keep in mind that those performance audit can be quite resource intensive. Did you use the default configuration of the plugin or were any custom settings used?

Would you try to disable the performance audit for each website except the smallest one (e.g. the mentioned 200 page site) in the website settings and let me know if this working for that website as expected?

The PHP warning itself definitely comes from using PHP 8.1 in this case, but shouldn't affect the overall plugin functionality.

nicoco59 commented 1 year ago

Thanks for your answer, we're currently running with 16v CPU and 16gb of ram for the database and 6 CPU / 8gb of ram for the API.

I changed the configuration that way :

I enabled the plugin only for our blogs so it won't have an impact on the server's performance.

I'll get back to you after I get some results, it would be interesting to be able to check only the pages we're interested in and not the whole site.

I'll open a feature request about it.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Thank you for your contributions.