@msonnad opened this Issue on March 20th 2020

We are getting this error very often.

ERROR Piwik\Tracker\Handler[2020-03-20 04:31:34 UTC] [8eafc] )

ERROR Piwik\Tracker\Handler[2020-03-20 04:31:34 UTC] [8eafc] Error query: Mysqli statement execute error : Data too long for column 'location_region' at row 1

ERROR Piwik\Tracker\Handler[2020-03-20 04:31:34 UTC] [8eafc] In query: INSERT INTO piwik_log_visit (idvisitor, config_id, location_ip, idsite, user_id, visit_first_action_time, visit_goal_buyer, visit_goal_converted, visit_last_action_time, visitor_days_since_first, visitor_days_since_order, visitor_returning, visitor_count_visits, visit_entry_idaction_name, visit_entry_idaction_url, visit_exit_idaction_name, visit_exit_idaction_url, visit_total_actions, visit_total_interactions, visit_total_searches, referer_keyword, referer_name, referer_type, referer_url, location_browser_lang, config_browser_engine, config_browser_name, config_browser_version, config_device_brand, config_device_model, config_device_type, config_os, config_os_version, visit_total_events, visitor_localtime, visitor_days_since_last, config_resolution, config_cookie, config_director, config_flash, config_gears, config_java, config_pdf, config_quicktime, config_realplayer, config_silverlight, config_windowsmedia, visit_total_time, location_city, location_country, location_latitude, location_longitude, location_region) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

ERROR Piwik\Tracker\Handler[2020-03-20 04:31:34 UTC] [8eafc] Parameters: array (

No Data s tracking for location_region column.
And the plugin UserCounty and UserCountryMap both are in an active state.

how to resolve this. This error is filling our logs file memory.
Currently, the column length is char(3)

We are using ,
PIWIK : 3.13.2
Mysql : 5.7.19

Manjunath S S

@sgiehl commented on March 20th 2020 Member

Which geolocation provider are you using in Matomo?

@msonnad commented on March 20th 2020

We are using,

It's a core plugin from Matomo

for Db

@msonnad commented on March 20th 2020

@sgiehl any solution for this issue ??


@sgiehl commented on March 20th 2020 Member

It should actually not happen at all. Are you using dbip or maxmind database? and which one? And wher are your visitor many located? Maybe the database returns an invalid value 🤔

@msonnad commented on March 20th 2020

We are using dbip database. Visitors are from USA , EMEA and Asia region manily.
Then how we can fix this ??

@sgiehl commented on March 20th 2020 Member

Paid or free database? Can you see the values of those queries that have too long values?

@msonnad commented on March 20th 2020

Actually, we are using GeoLite2-City from MaxMind, Its a free version we are using
Its insert query to piwik_log_visit for column location_region.
There is no data is tracking for this column.


@sgiehl commented on March 20th 2020 Member

@msonnad if the logging has no value for the region, it actually can't be too long. But maybe it's not printed in the log as some other value contains binary data causing the log to abort.
To avoid that error you can change the sql mode on your server and remove STRICT_TRANS_TABLES I think. That way the values should be truncated instead of throwing an error and not inserting them at all.

Powered by GitHub Issue Mirror