@ankush981 opened this Issue on June 18th 2018

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 commented on June 18th 2018 Member

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 commented on June 18th 2018

@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 commented on June 18th 2018 Member

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

@ankush981 commented on June 18th 2018

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<a href='/1318'>#1318</a>: *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<a href='/1318'>#1318</a>: *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 commented on May 24th 2020 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.

This Issue was closed on May 24th 2020
Powered by GitHub Issue Mirror