I am randomly getting errors in my log that look like this:

MESSAGE PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'ip_address' at row 1: INSERT INTO {tether_stats_activity_log} (elid, type, ip_address, sid, browser, created, hour, day, month, year, uid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => hit [:db_insert_placeholder_2] => 2600:1700:2f01:a300:e1a2:be00:19c9:8103 [:db_insert_placeholder_3] => N5oxKUx-o68rlrqIP3YpOslRlCixCs50oOzrxi6O2tA [:db_insert_placeholder_4] => Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 [:db_insert_placeholder_5] => 1562608514 [:db_insert_placeholder_6] => 1562605200 [:db_insert_placeholder_7] => 1562565600 [:db_insert_placeholder_8] => 1561960800 [:db_insert_placeholder_9] => 1546326000 [:db_insert_placeholder_10] => 0 ) in _tether_stats_track_element() (line 1136 of /srv/bindings/8b2148f896e34f12acbc720d41d83723/code/sites/all/modules/tether_stats/tether_stats.module).
SEVERITY error
HOSTNAME 2600:1700:2f01:a300:e1a2:be00:19c9:8103

It appears that it is trying to store an IPv6 value (2600:1700:2f01:a300:e1a2:be00:19c9:8103) into the ip_address column of table tether_stats_activity_log.

Comments

timb created an issue. See original summary.

  • rzan committed f9e39b4 on 8.x-1.x
    Issue #3066507 by rzan: Fix the length of the ip_address field to allow...

  • rzan committed f598da7 on 7.x-1.x
    Issue #3066507 by rzan: Changed the length of the ip_address field to...
rzan’s picture

Status: Active » Fixed

Hi timb,

I increased the ip_address field length in the associated commits to the main branch. It should now have enough room to store IPv6 in addition to IPv4 addresses so you shouldn't get those error messages anymore. Please let me know if you continue to have an issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.