Skip to content

Tracking Error "Data too long for column 'config_device_model'" #21061

@Thomas-TeS

Description

@Thomas-TeS

Context

I'm automatically and periodically importing logs into Matomo. Since a few days now, a problem occurred during the log-import. The server hosting Matomo always sent a "HTTP Error 500" after a certain number of lines got imported.

I've now tried to import them manually with the same behaviour as above and the following hint:

Max number of attempts reached, server is unreachable!
Fatal error: HTTP Error 500 Internal Server Error, response: {"status":"error","tracked":48,"invalid":0,"invalid_indices":[]}
You can restart the import of "/var/log/mocklog" from the point it failed by specifying --skip=6410 on the command line.

Using the line 6410 and the error-logs from the Matomo server I've narrowed it down to the following error:

Got error 'PHP message: [matomo.mock.de] Error in Matomo (tracker): Error query: Error query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'config_device_model' at row 1 In query: INSERT INTO matomo_log_visit (idvisitor, config_id, location_ip, idsite, profilable, visit_first_action_time, visit_goal_buyer, visit_goal_converted, visit_last_action_time, visitor_returning, visitor_seconds_since_first, visitor_seconds_since_order, 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_client_type, config_device_brand, config_device_model, config_device_type, config_os, config_os_version, visit_total_events, visitor_localtime, visitor_seconds_since_last, config_resolution, config_coo...'

The log contains the following value for 'config_device_model' which seems to be too long for the import:

Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.5672.126 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Expected Behavior

No error on log import? I don't know what to write here...

Current Behavior

Log-import fails and is completely aborted after failing.

Possible Solution

I think truncating the 'config_device_model' or increasing the size of the accoring column in the db are two feasable solutions.

Steps to Reproduce (for Bugs)

Create a log-file with the 'config_device_model' value from above and try to import it.

Your Environment

  • Matomo Version: 4.15.0
  • PHP Version: 8.1.14
  • Server Operating System: Debian 10.13
  • Additionally installed plugins: API, Actions, Annotations, BotTracker 2.08, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomVariables 4.1.3, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, GeoIp2, Goals, Heartbeat, HeatmapSessionRecording 4.5.10, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, LanguagesManager, Live, LogViewer 4.1.1, Login, MarketingCampaignsReporting 4.1.3, Marketplace, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Provider 4.0.5, Proxy, QueuedTracking 4.0.7, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SearchEngineKeywordsPerformance 4.5.4, SecurityInfo 4.0.2, SegmentEditor, SitesManager, TagManager, Tour, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.c: TrackingFor issues related to getting tracking data into Matomo.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions