Error query: Mysqli stat ement execute error : Out of range value for column 'time_transfer'

After upgrading to Matomo v4 beta, we get the following errors, not often, but regularly a few times a day amount ~5000 visits:

[proxy_fcgi:error] [pid 2527369:tid 140305038833408] [client XX.YY.ZZ.AA:61674] AH01071: Got error 'PHP message: Error in Matomo (tracker): Error query: Mysqli statement execute error : Out of range value for column 'time_transfer' at row 1
In query: INSERT INTO matomo_log_link_visit_action (idvisit, idsite, idvisitor, idaction_url, idaction_url_ref, idaction_name_ref, server_time, idpageview, pageview_position, time_spent_ref_action, time_dom_processing, time_network, time_on_load, time_server, time_transfer, idaction_name) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
  Parameters: array (   0 => 92267,   1 => 1,   2 => '\x87\x97x\x1c\x90p\xf5\xb6',   3 => 3,   4 => 136,   5 => 135,   6 => '2020-10-03 17:11:52',   7 => 'b0hNhc',   8 => 4,   9 => 1389,   10 => 21,   11 => 91,   12 => NULL,   13 => 122,   14 => -212,   15 => 2, )', referer: https://XXX.YYY/

I guess some database tables have not been migrated correctly but the CLI says that all is up-to-date. I recognised before that tables from disabled plugins are not migrated but still accessed, causing errors. But at least for this table column time_transfer I cannot find the related plugin and the local + server time plugin is enabled anyway. Anyone has an idea?

Hi,

Can you try out applying the changes from here:

It seems that for some requests the times are negative because responseEnd is smaller than responseStart. This change sets the values to 0 if they are negative.

1 Like

Many thanks, I just applied this to our instance and will let you know if the issue is solved, i.e. until tomorrow morning the error did reappear.

Error didn’t re-appear until now, I would render this as solved, many thanks!