Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL error when generating fake visitors #13073

Closed
ankush981 opened this issue Jun 18, 2018 · 5 comments
Closed

MySQL error when generating fake visitors #13073

ankush981 opened this issue Jun 18, 2018 · 5 comments
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@ankush981
Copy link

Hello, I created a fresh installation of Matomo, installed the VisitorGenerator plugin, and then tried to generate data for 90 days from the admin UI. The site crashed, with the following SQL error:

Error in Matomo (tracker): E rror query: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'quantity' at row 5 I n query: INSERT INTO matomo_log_conversion_item (idaction_sku, idaction_name, idaction_category, idaction_categor y2, idaction_category3, idaction_category4, idaction_category5, price, quantity, deleted, idorder, idsite, idvisi tor, server_time, idvisit) VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) , ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) , ( ?,?, ?,?,?,?,?,?,?,?,?,?,?,?,? ) , ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) , ( ?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) Parameters: array ( 0 => 1917, 1 => 1918, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => '0.00', 8 => 1, 9 => 0, 10 => 0, 11 => 1, 12 => '^Sk{(\\<9f>vX', 13 => '2018-03-24 14:49:02', 14 => '1706', 15 => 1283, 16 => 1284, 17 => 0, 18 => 0, 19 => 0, 20 => 0, 21 => 0, 22 => '0.00', 23 => 1, 24 => 0, 25 => 0, 26 => 1, 27 => '^Sk{(\\<9f>vX', 28 => '2018-03-24 14:49:02', 29 => '1" while reading response heade r from upstream, client: 127.0.0.1, server: matomo.localhost

I'm particularly bothered by the existence of values beginning with ^Sk in the query values. Happy to provide more debug info as needed.

@sgiehl
Copy link
Member

sgiehl commented Jun 18, 2018

the ^Sk values are a string representation of the binary values for idvisitor.
Could you check the field definition is correct on your install: `quantity` INT(10) UNSIGNED NOT NULL

@ankush981
Copy link
Author

@sgiehl Yes, field looks all right. Here's my table description:

+--------------------+---------------------+------+-----+---------+-------+
| Field              | Type                | Null | Key | Default | Extra |
+--------------------+---------------------+------+-----+---------+-------+
| idsite             | int(10) unsigned    | NO   | MUL | NULL    |       |
| idvisitor          | binary(8)           | NO   |     | NULL    |       |
| server_time        | datetime            | NO   |     | NULL    |       |
| idvisit            | bigint(10) unsigned | NO   | PRI | NULL    |       |
| idorder            | varchar(100)        | NO   | PRI | NULL    |       |
| idaction_sku       | int(10) unsigned    | NO   | PRI | NULL    |       |
| idaction_name      | int(10) unsigned    | NO   |     | NULL    |       |
| idaction_category  | int(10) unsigned    | NO   |     | NULL    |       |
| idaction_category2 | int(10) unsigned    | NO   |     | NULL    |       |
| idaction_category3 | int(10) unsigned    | NO   |     | NULL    |       |
| idaction_category4 | int(10) unsigned    | NO   |     | NULL    |       |
| idaction_category5 | int(10) unsigned    | NO   |     | NULL    |       |
| price              | float               | NO   |     | NULL    |       |
| quantity           | int(10) unsigned    | NO   |     | NULL    |       |
| deleted            | tinyint(1) unsigned | NO   |     | NULL    |       |
+--------------------+---------------------+------+-----+---------+-------+

@sgiehl
Copy link
Member

sgiehl commented Jun 18, 2018

Is that reproducible? Does it happen every time you generate the visits?

@ankush981
Copy link
Author

So, this time I tried to generate 5 days' worth of data and got timed out. Here's the step by step description (local setup):

The server's error logs don't reveal much:

2018/06/18 21:42:14 [error] 1318#1318: *2072 upstream timed out (110: Connection timed out) while reading response header from upstream, client: ::1, server: matomo.localhost, request: "POST /index.php?module=VisitorGenerator&action=generate&idSite=1&period=day&date=yesterday HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock", host: "matomo.localhost", referrer: "http://matomo.localhost/index.php?module=VisitorGenerator&action=index&idSite=1&period=day&date=yesterday"

Curiously, after some time I also see this in the error logs:

2018/06/18 21:44:25 [error] 1318#1318: *2910 FastCGI sent in stderr: "PHP message: Error in Matomo (tracker): Custom timestamp is 337578 seconds old, requires &token_auth" while reading response header from upstream, client: 127.0.0.1, server: matomo.localhost, request: "GET /piwik.php?&cdt=2018-06-14+18%3A28%3A07&cip=69.171.0.0&token_auth=7d5d817e17cab3725f7864d27fe9e0e0&dp=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "matomo.localhost"

@Findus23
Copy link
Member

As no one else reported this issue, this might have been some weird special case on your server.
If this still happens on the latest Matomo version, please reopen the issue or create a new one.

@Findus23 Findus23 added the worksforme The issue cannot be reproduced and things work as intended. label May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

3 participants