Skip to content

Commit 9091d3e

Browse files
authored
Merge pull request #291 from matomo-org/PG-4266-remove-piwik-ref
Removed Piwik reference, #PG-4266
2 parents d319dec + 2fc7e58 commit 9091d3e

5 files changed

Lines changed: 28 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
## Changelog
22

3-
5.1.1 - 2021-10-23
3+
5.1.2 - 2025-07-07
4+
- Textual changes
5+
6+
5.1.1 - 2024-10-23
47
- Fixed fatal error when running queuedtracking:monitor command on Windows
58

6-
5.1.0 - 2021-10-21
9+
5.1.0 - 2024-10-21
710
- Increased number of queue tracking workers to 4096
811
- Enhance queue monitor and process commands
912
- Added Redis cluster option

Queue/Backend/Redis.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,13 @@ protected function connect()
274274
return $success;
275275
}
276276

277-
public function setConfig($host, $port, $timeout, $password)
278-
{
277+
public function setConfig(
278+
$host,
279+
$port,
280+
$timeout,
281+
#[\SensitiveParameter]
282+
$password
283+
) {
279284
$this->disconnect();
280285

281286
$this->host = $host;

Queue/Backend/RedisCluster.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,13 @@ protected function connect()
315315
}
316316
}
317317

318-
public function setConfig($host, $port, $timeout, $password)
319-
{
318+
public function setConfig(
319+
$host,
320+
$port,
321+
$timeout,
322+
#[\SensitiveParameter]
323+
$password
324+
) {
320325
$this->disconnect();
321326

322327
$this->host = $host;

docs/faq.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ for Matomo anyway.
1212

1313
__Where can I configure and enable the queue?__
1414

15-
In your Piwik instance go to "Administration => General Settings". There is a config section for this plugin.
15+
In your Matomo instance go to "Administration => General Settings". There is a config section for this plugin.
1616

1717
__When will a queued tracking request be processed?__
1818

1919
First you should know that multiple tracking requests will be inserted into the database at once using
20-
[bulk tracking](http://developer.piwik.org/api-reference/tracking-api#bulk-tracking) as soon as a configurable number
20+
[bulk tracking](http://developer.matomo.org/api-reference/tracking-api#bulk-tracking) as soon as a configurable number
2121
of requests is queued. By default we will check whether enough requests are queued during a regular tracking request
2222
and start processing them right after sending a response to the browser to make sure a user won't have to wait until
2323
the queue has finished to process all requests. Have a look at this graph to see how it works:
2424

25-
![How it works](https://raw.githubusercontent.com/piwik/plugin-QueuedTracking/master/docs/How_it_works.png)
25+
![How it works](https://raw.githubusercontent.com/matomo-org/plugin-QueuedTracking/master/docs/How_it_works.png)
2626

2727
__I do not want to process queued requests within a tracking request, what shall I do?__
2828

2929
Don't worry, if this solution doesn't work out for you for some reason you can disable it and process all queued
30-
requests using the [Piwik console](http://developer.piwik.org/guides/piwik-on-the-command-line). Just follow these steps:
30+
requests using the [Matomo console](http://developer.matomo.org/guides/piwik-on-the-command-line). Just follow these steps:
3131

32-
* Disable the setting "Process during tracking request" in the Piwik UI under "Settings => Plugin Settings"
32+
* Disable the setting "Process during tracking request" in the Matomo UI under "Settings => Plugin Settings"
3333
* Setup a cronjob that executes the command `./console queuedtracking:process` for instance every minute
3434
* That's it
3535
* Or, if you have __"non WINDOWS OS"__ you can use the [Supervisor](http://supervisord.org/) as a cron alternative.
@@ -42,7 +42,7 @@ queued requests at a time.
4242

4343
Example crontab entry that starts the processor every minute:
4444

45-
`* * * * * cd /piwik && ./console queuedtracking:process >/dev/null 2>&1`
45+
`* * * * * cd /matomo && ./console queuedtracking:process >/dev/null 2>&1`
4646

4747
Example Supervisor entry that will start 16 processors/workers with 10 loop cycle times and auto restart:
4848

@@ -72,7 +72,7 @@ Yes, you can. Just execute the command `./console queuedtracking:monitor`. This
7272

7373
__Can I improve the speed of inserting requests from the Redis queue to the database?__
7474

75-
Yes, you can by adding more workers. By default only one worker is activated at a time and only one worker processes tracking requests from Redis to the database. When inserting tracking requests into the database, at time of writing this, about 80% of the time is spent in PHP and the database might be rather bored. If you have multiple CPUs available on your server you can add more workers. You can do this by going in the Piwik Admin interface to "Plugin Settings". There will be a setting "Number of queue workers". Increase this number to the number of CPUs you want to dedeciate for processing requests. Best practice is to add more workers step by step. So first increase this number to 2 and check if the tracking request insertions is fast enough for you. If not and you have more CPUs available, increase the number again.
75+
Yes, you can by adding more workers. By default only one worker is activated at a time and only one worker processes tracking requests from Redis to the database. When inserting tracking requests into the database, at time of writing this, about 80% of the time is spent in PHP and the database might be rather bored. If you have multiple CPUs available on your server you can add more workers. You can do this by going in the Matomo Admin interface to "Plugin Settings". There will be a setting "Number of queue workers". Increase this number to the number of CPUs you want to dedeciate for processing requests. Best practice is to add more workers step by step. So first increase this number to 2 and check if the tracking request insertions is fast enough for you. If not and you have more CPUs available, increase the number again.
7676

7777
When using multiple workers it might be worth to lower the number of "Number of requests to process" to eg 15 in "Plugin Settings". By default 25 requests are inserted in one step by using transactions. This means different workers might have to wait for each other. By lowering that number each worker will block the DB for less time.
7878

@@ -92,7 +92,7 @@ We currently write into the Redis default database by default but you can config
9292

9393
You can also use a "Redis Cluster" to distribute all tracking requests data across multiple Redis masters/shards, complete with the HA feature.
9494

95-
__Why do some tests fail on my local Piwik instance?__
95+
__Why do some tests fail on my local Matomo instance?__
9696

9797
Make sure the requirements mentioned above are met and Redis needs to run on 127.0.0.1:6379 with no password for the
9898
integration tests to work. It will use the database "15" and the tests may flush all data it contains. Make sure

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "QueuedTracking",
3-
"version": "5.1.1",
3+
"version": "5.1.2",
44
"description": "Scale your large traffic Matomo service by queuing tracking requests in Redis or MySQL for better performance and reliability when experiencing peaks.",
55
"theme": false,
66
"keywords": ["tracker", "tracking", "queue", "redis"],

0 commit comments

Comments
 (0)