plugin-QueuedTracking
plugin-QueuedTracking copied to clipboard
Randomly getting "x" values in tacking queues
Hi,
I'm randomly getting "x" values in the redis queues which are triggering errors in php.log :
[04-Sep-2024 13:06:23 UTC] WARNING QueuedTracking[2024-09-04 13:06:23 UTC] [3268448] /srv/matomo/core/Tracker/RequestSet.php(161): Warning - Trying to access array offset on value of type null - Matomo 4.14.2 - Please report this message in the Matomo forums: https://forum.matomo.org (please do a search first as it might have been reported already) #0/core/Tracker/RequestSet.php(161),#1/plugins/QueuedTracking/Queue.php(98),#2/plugins/QueuedTracking/Queue/Processor.php(112),#3/plugins/QueuedTracking/Commands/Process.php(86),#4/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257),#5/vendor/symfony/console/Symfony/Component/Console/Application.php(874),#6/vendor/symfony/console/Symfony/Component/Console/Application.php(195),#7/core/Console.php(108),[internal function]: Piwik\Console->originDoRun(),#9/core/Console.php(147)
the json_decode in getRequestSetsToProcess (Queue.php) tries to parse the value which is in redis x, fails, returns null and subsequently trigger the above error.
I was able to confirm that the "x" value comes from redis using a manual lpop directly querying redis when this bug happens :
My setup :
- 3 matomo php servers with local redis
- 1 Mariadb Database
- Each matomo frontend server have its local redis and workers for the queue plugin
Versions :
- Php 8.2.1
- Matomo 4.14.2
- MariaDB 10.11.3
- Plugin version : 4.0.6
Hi @theredcat . Thank you for taking the time to create this issue. I'm sorry to hear that you're experiencing this issue. Is it possible that your Redis instance only returned the first character instead of the whole record? We use gzcompress, which often starts with x, but even an empty string results in more than just x.
You might try upgrading to version 4.0.7 of the plugin as it has some error handling improvements. You would have the option of enabling the log_failed_tracking_request_body config to have the full body of the request output to your log. There's more information in the debugging section of the plugin FAQ.
@theredcat Any update ?
Closing this due to inactivity, feel free re-open or create a new issue, if still facing the same issue.