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

Numeric value out of range: 1264 Out of range value for column 'visit_total_interactions' #11722

Closed
pengshuai2010 opened this issue May 19, 2017 · 3 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@pengshuai2010
Copy link

This is similar to the issue #9565 .
I'm using version 3.04, and I get the following error when importing logs with import_logs.py.
2017/05/19 22:01:37 [error] 7#7: *25796 FastCGI sent in stderr: "PHP message: Error in Piwik (tracker): Error query: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'visit_total_interactions' at row 1 In query: UPDATE piwik_log_visit SET idvisitor = ?, user_id = ?, visit_last_action_time = ?, visit_exit_idaction_url = ?, visit_total_actions = visit_total_actions + 1 , visit_total_interactions = visit_total_interactions + 1 , visit_total_time = ? WHERE idsite = ? AND idvisit = ? Parameters: array ( 0 => '���\\����', 1 => '54.85.240.164', 2 => '2017-05-15 03:41:37', 3 => 1662, 4 => 63036, 5 => 1, 6 => 4, )" while reading response header from upstream, client: 10.110.52.171, server: , request: "POST /piwik.php HTTP/1.1", upstream: "fastcgi://172.18.0.3:9000", host: "speng.mm-corp.net:5002"
This can be fixed by changing https://github.com/piwik/piwik/blob/3.x-dev/plugins/Actions/Columns/VisitTotalInteractions.php#L20 to protected $columnType = 'INT(11) UNSIGNED DEFAULT 0';
Another field visit_total_searches may also need to be changed.

@mattab
Copy link
Member

mattab commented Jun 21, 2017

This will be fixed in Piwik 4 by #11086

@mattab mattab closed this as completed Jun 21, 2017
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Jun 21, 2017
@SlavikCA
Copy link

SlavikCA commented Jul 7, 2017

@pengshuai2010 I fixed this issue for myself in 3.0.4 by running this SQL

ALTER TABLE `piwik_log_visit` CHANGE `visit_total_interactions` `visit_total_interactions` MEDIUMINT(5) UNSIGNED NULL DEFAULT '0';

https://dev.mysql.com/doc/refman/5.7/en/integer-types.html

@kaplun
Copy link

kaplun commented May 12, 2018

Just stumbled over this in version 3.5.0. Thanks @SlavikCA for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

4 participants