`./lnms migrate` results in SQL query error "Syntax error or access violation: 1118 Row size too large"

Attempting to upgrade LibreNMS:

root@librenms0:/opt/librenms# ./lnms migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migrating: 2020_01_09_1300_migrate_devices_attribs_table

In Connection.php line 664:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual
  . You have to change some columns to TEXT or BLOBs (SQL: alter table `devices` add `disable_notify` tinyint(1) not null default '0')


In PDOStatement.php line 119:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual
  . You have to change some columns to TEXT or BLOBs


In PDOStatement.php line 117:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual
  . You have to change some columns to TEXT or BLOBs

A possilbe solution is mentioned in the error, but I’m wondering what the community thinks and whether this issue is known or not.

Since today our librenms installation is also stuck. The daily.log show the same errors:

Updating SQL-Schema

In Connection.php line 664:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have t
  o change some columns to TEXT or BLOBs (SQL: alter table `devices` add `disable_notify` tinyint(1) not null default '0')


In PDOStatement.php line 119:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have t
  o change some columns to TEXT or BLOBs


In PDOStatement.php line 117:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have t
  o change some columns to TEXT or BLOBs

Returned: 0

Hey guys,

is there anyone who can help? Or are we the only ones affected?

Thanks.

Changing the row format of the table “devices” to DYNAMIC fixed it for me. A successful migration was possible afterwards.

@NominaSumpta @tobzsc
Please post
./validate.php

Which command did you type ?

root@librenms0:/opt/librenms# ./validate.php 
====================================
Component | Version
--------- | -------
LibreNMS  | 1.59-93-g8fe0e83f7
DB Schema | 2019_12_17_151314_add_invert_map_to_alert_rules (153)
PHP       | 7.2.26-1+0~20191218.33+debian9~1.gbpb5a34b
MySQL     | 10.3.21-MariaDB-1:10.3.21+maria~stretch
RRDTool   | 1.6.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.9.2
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[FAIL]  Your database is out of date!
	[FIX]: 
	./lnms migrate
[FAIL]  The poller (nms0.cyberfusion.cloud) has not completed within the last 5 minutes, check the cron job.
[FAIL]  Discovery has not completed in the last 24 hours.
	[FIX]: 
	Check the cron job to make sure it is running and using discovery-wrapper.py
[WARN]  Your install is over 24 hours out of date, last update: Thu, 16 Jan 2020 09:06:26 +0000
	[FIX]: 
	Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN]  Your local git contains modified files, this could prevent automatic updates.
	[FIX]: 
	You can fix this with ./scripts/github-remove
	Modified Files:
	 rrd/.gitignore
[FAIL]  Some folders have incorrect file permissions, this may cause issues.
	[FIX]: 
	sudo chown -R librenms:librenms /opt/librenms
	sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
	Files:
	 /opt/librenms/storage/framework/views/38d87a9f71f46c753636e43b9c861184
root@librenms0:/opt/librenms# git diff
diff --git a/rrd/.gitignore b/rrd/.gitignore
deleted file mode 100644
index 5e7d2734c..000000000
--- a/rrd/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore

@NominaSumpta @tobzsc

Could you post ?

cd LIBRENMS_DIR
host=$(cat .env | grep DB_HOST | cut -f2 -d\=)
port=$(cat .env | grep DB_PORT | cut -f2 -d\=)
password=$(cat .env | grep DB_PASSWORD | cut -f2 -d\=)
echo "desc devices" | mysql -h $host -P $port -u librenms -p$password librenms
MariaDB [librenms]> desc devices;
+---------------------------+----------------------------------------------+------+-----+---------+----------------+
| Field                     | Type                                         | Null | Key | Default | Extra          |
+---------------------------+----------------------------------------------+------+-----+---------+----------------+
| device_id                 | int(10) unsigned                             | NO   | PRI | NULL    | auto_increment |
| hostname                  | varchar(128)                                 | NO   | MUL | NULL    |                |
| sysName                   | varchar(128)                                 | YES  | MUL | NULL    |                |
| ip                        | varbinary(16)                                | YES  |     | NULL    |                |
| community                 | varchar(255)                                 | YES  |     | NULL    |                |
| authlevel                 | enum('noAuthNoPriv','authNoPriv','authPriv') | YES  |     | NULL    |                |
| authname                  | varchar(64)                                  | YES  |     | NULL    |                |
| authpass                  | varchar(64)                                  | YES  |     | NULL    |                |
| authalgo                  | enum('MD5','SHA')                            | YES  |     | NULL    |                |
| cryptopass                | varchar(64)                                  | YES  |     | NULL    |                |
| cryptoalgo                | enum('AES','DES','')                         | YES  |     | NULL    |                |
| snmpver                   | varchar(4)                                   | NO   |     | v2c     |                |
| port                      | smallint(5) unsigned                         | NO   |     | 161     |                |
| transport                 | varchar(16)                                  | NO   |     | udp     |                |
| timeout                   | int(11)                                      | YES  |     | NULL    |                |
| retries                   | int(11)                                      | YES  |     | NULL    |                |
| snmp_disable              | tinyint(1)                                   | NO   |     | 0       |                |
| bgpLocalAs                | int(10) unsigned                             | YES  |     | NULL    |                |
| sysObjectID               | varchar(128)                                 | YES  |     | NULL    |                |
| sysDescr                  | text                                         | YES  |     | NULL    |                |
| sysContact                | text                                         | YES  |     | NULL    |                |
| version                   | text                                         | YES  |     | NULL    |                |
| hardware                  | text                                         | YES  |     | NULL    |                |
| features                  | text                                         | YES  |     | NULL    |                |
| location_id               | int(10) unsigned                             | YES  |     | NULL    |                |
| os                        | varchar(32)                                  | YES  | MUL | NULL    |                |
| status                    | tinyint(1)                                   | NO   | MUL | 0       |                |
| status_reason             | varchar(50)                                  | NO   |     | NULL    |                |
| ignore                    | tinyint(1)                                   | NO   |     | 0       |                |
| disabled                  | tinyint(1)                                   | NO   |     | 0       |                |
| uptime                    | bigint(20)                                   | YES  |     | NULL    |                |
| agent_uptime              | int(10) unsigned                             | NO   |     | 0       |                |
| last_polled               | timestamp                                    | YES  | MUL | NULL    |                |
| last_poll_attempted       | timestamp                                    | YES  | MUL | NULL    |                |
| last_polled_timetaken     | double(5,2)                                  | YES  |     | NULL    |                |
| last_discovered_timetaken | double(5,2)                                  | YES  |     | NULL    |                |
| last_discovered           | timestamp                                    | YES  |     | NULL    |                |
| last_ping                 | timestamp                                    | YES  |     | NULL    |                |
| last_ping_timetaken       | double(8,2)                                  | YES  |     | NULL    |                |
| purpose                   | text                                         | YES  |     | NULL    |                |
| type                      | varchar(20)                                  | NO   |     |         |                |
| serial                    | text                                         | YES  |     | NULL    |                |
| icon                      | varchar(255)                                 | YES  |     | NULL    |                |
| poller_group              | int(11)                                      | NO   |     | 0       |                |
| override_sysLocation      | tinyint(1)                                   | YES  |     | 0       |                |
| notes                     | text                                         | YES  |     | NULL    |                |
| port_association_mode     | int(11)                                      | NO   |     | 1       |                |
| max_depth                 | int(11)                                      | NO   |     | 0       |                |
+---------------------------+----------------------------------------------+------+-----+---------+----------------+
48 rows in set (0.007 sec)

Get the script from here https://dba.stackexchange.com/a/114870

cat>/tmp/row_size.pl <<\EOF
#!/usr/bin/perl
use strict;
$| = 1;

my %DataType = (
"TINYINT"=>1, "SMALLINT"=>2, "MEDIUMINT"=>3, "INT"=>4, "INTEGER"=>4, "BIGINT"=>8,
"FLOAT"=>'$M<=24?4:8', "DOUBLE"=>8,
"DECIMAL"=>'int(($M-$D)/9)*4+int(((($M-$D)%9)+1)/2)+int($D/9)*4+int((($D%9)+1)/2)',
"NUMERIC"=>'int(($M-$D)/9)*4+int(((($M-$D)%9)+1)/2)+int($D/9)*4+int((($D%9)+1)/2)',
"BIT"=>'($M+7)>>3',
"DATE"=>3, "TIME"=>3, "DATETIME"=>8, "TIMESTAMP"=>4, "YEAR"=>1,
"BINARY"=>'$M',"CHAR"=>'$M*$CL',
"VARBINARY"=>'$M+($M>255?2:1)', "VARCHAR"=>'$M*$CL+($M>255?2:1)',
"ENUM"=>'$M>255?2:1', "SET"=>'($M+7)>>3',
"TINYBLOB"=>9, "TINYTEXT"=>9,
"BLOB"=>10, "TEXT"=>10,
"MEDIUMBLOB"=>11, "MEDIUMTEXT"=>11,
"LONGBLOB"=>12, "LONGTEXT"=>12
);

my %DataTypeMin = (
"VARBINARY"=>'($M>255?2:1)', "VARCHAR"=>'($M>255?2:1)'
);

my ($D, $M, $S, $C, $L, $dt, $dp ,$bc, $CL);
my $fieldCount = 0;
my $byteCount = 0;
my $byteCountMin = 0;
my @fields = ();
my $fieldName;
my $tableName;
my $defaultDbCL = 1;
my $defaultTableCL = 1;
my %charsetMaxLen;
my %collationMaxLen;

open (CHARSETS, "mysql -B --skip-column-names information_schema -e 'select CHARACTER_SET_NAME,MAXLEN from CHARACTER_SETS;' |");
%charsetMaxLen = map ( ( /^(\w+)/ => /(\d+)$/ ), <CHARSETS>);
close CHARSETS;

open (COLLATIONS, "mysql -B --skip-column-names information_schema -e 'select COLLATION_NAME,MAXLEN from CHARACTER_SETS INNER JOIN COLLATIONS USING(CHARACTER_SET_NAME);' |");
%collationMaxLen = map ( ( /^(\w+)/ => /(\d+)$/ ), <COLLATIONS>);
close COLLATIONS;

open (TABLEINFO, "mysqldump -d --compact ".join(" ",@ARGV)." |");

while (<TABLEINFO>) {
chomp;
if ( ($S,$C) = /create database.*?`([^`]+)`.*default\scharacter\sset\s+(\w+)/i ) {
$defaultDbCL = exists $charsetMaxLen{$C} ? $charsetMaxLen{$C} : 1;
print "Database: $S".($C?" DEFAULT":"").($C?" CHARSET $C":"")." (bytes per char: $defaultDbCL)\n\n";
next;
}
if ( /^create table\s+`([^`]+)`.*/i ) {
$tableName = $1;
@fields = ();
next;
}
if ( $tableName && (($C,$L) = /^\)(?:.*?default\scharset=(\w+))?(?:.*?collate=(\w+))?/i) ) {
$defaultTableCL = exists $charsetMaxLen{$C} ? $charsetMaxLen{$C} : (exists $collationMaxLen{$L} ? $collationMaxLen{$L} : $defaultDbCL);
print "Table: $tableName".($C||$L?" DEFAULT":"").($C?" CHARSET $C":"").($L?" COLLATION $L":"")." (bytes per char: $defaultTableCL)\n";
$tableName = "";
$fieldCount = 0;
$byteCount = 0;
$byteCountMin = 0;
while ($_ = shift @fields) {
if ( ($fieldName,$dt,$dp,$M,$D,$S,$C,$L) = /\s\s`([^`]+)`\s+([a-z]+)(\((\d+)(?:,(\d+))?\)|\((.*)\))?(?:.*?character\sset\s+(\w+))?(?:.*?collate\s+(\w+))?/i ) {
$dt = uc $dt;
if (exists $DataType{$dt}) {
if (length $S) {
$M = ($S =~ s/(\'.*?\'(?!\')(?=,|$))/$1/g);
$dp = "($M : $S)"
}
$D = 0 if !$D;
$CL = exists $charsetMaxLen{$C} ? $charsetMaxLen{$C} : (exists $collationMaxLen{$L} ? $collationMaxLen{$L} : $defaultTableCL);
$bc = eval($DataType{$dt});
$byteCount += $bc;
$byteCountMin += exists $DataTypeMin{$dt} ? $DataTypeMin{$dt} : $bc;
} else {
$bc = "??";
}
$fieldName.="\t" if length($fieldName) < 8;
print "bytes:\t".$bc."\t$fieldName\t$dt$dp".($C?" $C":"").($L?" COLL $L":"")."\n";
++$fieldCount;
}
}
print "total:\t$byteCount".($byteCountMin!=$byteCount?"\tleast: $byteCountMin":"\t\t")."\tcolumns: $fieldCount\n\n";
next;
}
push @fields, $_;
}
close TABLEINFO;
EOF

Then paste output:

cd /tmp
perl row_size.pl -h $host -P $port -u librenms -p$password librenms devices

Mine is:

$ perl row_size.pl -h $host -P $port -u librenms -p$password librenms devices
Table: devices DEFAULT CHARSET utf8 COLLATION utf8_unicode_ci (bytes per char: 3)
bytes:	4	device_id	INT(10)
bytes:	385	hostname	VARCHAR(128) COLL utf8_unicode_ci
bytes:	385	sysName		VARCHAR(128) COLL utf8_unicode_ci
bytes:	17	ip		VARBINARY(16)
bytes:	766	community	VARCHAR(255) COLL utf8_unicode_ci
bytes:	1	authlevel	ENUM(3 : 'noAuthNoPriv','authNoPriv','authPriv') COLL utf8_unicode_ci
bytes:	193	authname	VARCHAR(64) COLL utf8_unicode_ci
bytes:	193	authpass	VARCHAR(64) COLL utf8_unicode_ci
bytes:	1	authalgo	ENUM(2 : 'MD5','SHA') COLL utf8_unicode_ci
bytes:	193	cryptopass	VARCHAR(64) COLL utf8_unicode_ci
bytes:	1	cryptoalgo	ENUM(3 : 'AES','DES','') COLL utf8_unicode_ci
bytes:	13	snmpver		VARCHAR(4) COLL utf8_unicode_ci
bytes:	2	port		SMALLINT(5)
bytes:	49	transport	VARCHAR(16) COLL utf8_unicode_ci
bytes:	4	timeout		INT(11)
bytes:	4	retries		INT(11)
bytes:	1	snmp_disable	TINYINT(1)
bytes:	4	bgpLocalAs	INT(10)
bytes:	385	sysObjectID	VARCHAR(128) COLL utf8_unicode_ci
bytes:	10	sysDescr	TEXT COLL utf8_unicode_ci
bytes:	10	sysContact	TEXT COLL utf8_unicode_ci
bytes:	10	version		TEXT COLL utf8_unicode_ci
bytes:	10	hardware	TEXT COLL utf8_unicode_ci
bytes:	10	features	TEXT COLL utf8_unicode_ci
bytes:	4	location_id	INT(10)
bytes:	97	os		VARCHAR(32) COLL utf8_unicode_ci
bytes:	1	status		TINYINT(1)
bytes:	151	status_reason	VARCHAR(50) COLL utf8_unicode_ci
bytes:	1	ignore		TINYINT(1)
bytes:	1	disabled	TINYINT(1)
bytes:	8	uptime		BIGINT(20)
bytes:	4	agent_uptime	INT(10)
bytes:	4	last_polled	TIMESTAMP
bytes:	4	last_poll_attempted	TIMESTAMP
bytes:	8	last_polled_timetaken	DOUBLE(5,2)
bytes:	8	last_discovered_timetaken	DOUBLE(5,2)
bytes:	4	last_discovered	TIMESTAMP
bytes:	4	last_ping	TIMESTAMP
bytes:	8	last_ping_timetaken	DOUBLE(8,2)
bytes:	10	purpose		TEXT COLL utf8_unicode_ci
bytes:	61	type		VARCHAR(20) COLL utf8_unicode_ci
bytes:	10	serial		TEXT COLL utf8_unicode_ci
bytes:	766	icon		VARCHAR(255) COLL utf8_unicode_ci
bytes:	4	poller_group	INT(11)
bytes:	1	override_sysLocation	TINYINT(1)
bytes:	10	notes		TEXT COLL utf8_unicode_ci
bytes:	4	port_association_mode	INT(11)
bytes:	4	max_depth	INT(11)
bytes:	1	disable_notify	TINYINT(1)
total:	3829	least: 175	columns: 49

Why? We have already established that row size is the issue.

In Connection.php line 664:

  SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual
  . You have to change some columns to TEXT or BLOBs (SQL: alter table `devices` add `disable_notify` tinyint(1) not null default '0')

It seems your row size limit is 8126 bytes.

Normally this command should add only one byte
alter table devices add disable_notify tinyint(1) not null default '0'

It should mean that your current row size is already 8126 bytes. I need to confirm that.

Also, I need to confirm that your character encoding is the cause of the issue. On my setup, I am very far from 8126.

The only commands the script is taking are:

mysql -B --skip-column-names information_schema -e 'select CHARACTER_SET_NAME,MAXLEN from CHARACTER_SETS;
mysql -B --skip-column-names information_schema -e 'select COLLATION_NAME,MAXLEN from CHARACTER_SETS INNER JOIN COLLATIONS USING(CHARACTER_SET_NAME);
mysqldump -d --compact -h $host -P $port -u librenms -p$password librenms devices
root@librenms0:~# mysql -B --skip-column-names information_schema -e 'select CHARACTER_SET_NAME,MAXLEN from CHARACTER_SETS';
big5	2
dec8	1
cp850	1
hp8	1
koi8r	1
latin1	1
latin2	1
swe7	1
ascii	1
ujis	3
sjis	2
hebrew	1
tis620	1
euckr	2
koi8u	1
gb2312	2
greek	1
cp1250	1
gbk	2
latin5	1
armscii8	1
utf8	3
ucs2	2
cp866	1
keybcs2	1
macce	1
macroman	1
cp852	1
latin7	1
utf8mb4	4
cp1251	1
utf16	4
utf16le	4
cp1256	1
cp1257	1
utf32	4
binary	1
geostd8	1
cp932	2
eucjpms	3
root@librenms0:~# mysql -B --skip-column-names information_schema -e 'select COLLATION_NAME,MAXLEN from CHARACTER_SETS INNER JOIN COLLATIONS USING(CHARACTER_SET_NAME)';
root@librenms0:~#

Please post that as well

Mine is:

$ mysqldump -d --compact -h $host -P $port -u librenms -p$password librenms devices
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `devices` (
  `device_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `hostname` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `sysName` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ip` varbinary(16) DEFAULT NULL,
  `community` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authlevel` enum('noAuthNoPriv','authNoPriv','authPriv') COLLATE utf8_unicode_ci DEFAULT NULL,
  `authname` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authpass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authalgo` enum('MD5','SHA') COLLATE utf8_unicode_ci DEFAULT NULL,
  `cryptopass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cryptoalgo` enum('AES','DES','') COLLATE utf8_unicode_ci DEFAULT NULL,
  `snmpver` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'v2c',
  `port` smallint(5) unsigned NOT NULL DEFAULT '161',
  `transport` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'udp',
  `timeout` int(11) DEFAULT NULL,
  `retries` int(11) DEFAULT NULL,
  `snmp_disable` tinyint(1) NOT NULL DEFAULT '0',
  `bgpLocalAs` int(10) unsigned DEFAULT NULL,
  `sysObjectID` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sysDescr` text COLLATE utf8_unicode_ci,
  `sysContact` text COLLATE utf8_unicode_ci,
  `version` text COLLATE utf8_unicode_ci,
  `hardware` text COLLATE utf8_unicode_ci,
  `features` text COLLATE utf8_unicode_ci,
  `location_id` int(10) unsigned DEFAULT NULL,
  `os` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `status_reason` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `ignore` tinyint(1) NOT NULL DEFAULT '0',
  `disabled` tinyint(1) NOT NULL DEFAULT '0',
  `uptime` bigint(20) DEFAULT NULL,
  `agent_uptime` int(10) unsigned NOT NULL DEFAULT '0',
  `last_polled` timestamp NULL DEFAULT NULL,
  `last_poll_attempted` timestamp NULL DEFAULT NULL,
  `last_polled_timetaken` double(5,2) DEFAULT NULL,
  `last_discovered_timetaken` double(5,2) DEFAULT NULL,
  `last_discovered` timestamp NULL DEFAULT NULL,
  `last_ping` timestamp NULL DEFAULT NULL,
  `last_ping_timetaken` double(8,2) DEFAULT NULL,
  `purpose` text COLLATE utf8_unicode_ci,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `serial` text COLLATE utf8_unicode_ci,
  `icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `poller_group` int(11) NOT NULL DEFAULT '0',
  `override_sysLocation` tinyint(1) DEFAULT '0',
  `notes` text COLLATE utf8_unicode_ci,
  `port_association_mode` int(11) NOT NULL DEFAULT '1',
  `max_depth` int(11) NOT NULL DEFAULT '0',
  `disable_notify` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`device_id`),
  KEY `hostname` (`hostname`),
  KEY `sysName` (`sysName`),
  KEY `os` (`os`),
  KEY `status` (`status`),
  KEY `last_polled` (`last_polled`),
  KEY `last_poll_attempted` (`last_poll_attempted`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

I would prefer you use the script so that I wont’t need to compute values manually

root@librenms0:~# mysqldump -d --compact librenms devices
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `devices` (
  `device_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `hostname` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `sysName` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ip` varbinary(16) DEFAULT NULL,
  `community` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authlevel` enum('noAuthNoPriv','authNoPriv','authPriv') COLLATE utf8_unicode_ci DEFAULT NULL,
  `authname` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authpass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `authalgo` enum('MD5','SHA') COLLATE utf8_unicode_ci DEFAULT NULL,
  `cryptopass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cryptoalgo` enum('AES','DES','') COLLATE utf8_unicode_ci DEFAULT NULL,
  `snmpver` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'v2c',
  `port` smallint(5) unsigned NOT NULL DEFAULT 161,
  `transport` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'udp',
  `timeout` int(11) DEFAULT NULL,
  `retries` int(11) DEFAULT NULL,
  `snmp_disable` tinyint(1) NOT NULL DEFAULT 0,
  `bgpLocalAs` int(10) unsigned DEFAULT NULL,
  `sysObjectID` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sysDescr` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `sysContact` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `version` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `hardware` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `features` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `location_id` int(10) unsigned DEFAULT NULL,
  `os` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT 0,
  `status_reason` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `ignore` tinyint(1) NOT NULL DEFAULT 0,
  `disabled` tinyint(1) NOT NULL DEFAULT 0,
  `uptime` bigint(20) DEFAULT NULL,
  `agent_uptime` int(10) unsigned NOT NULL DEFAULT 0,
  `last_polled` timestamp NULL DEFAULT NULL,
  `last_poll_attempted` timestamp NULL DEFAULT NULL,
  `last_polled_timetaken` double(5,2) DEFAULT NULL,
  `last_discovered_timetaken` double(5,2) DEFAULT NULL,
  `last_discovered` timestamp NULL DEFAULT NULL,
  `last_ping` timestamp NULL DEFAULT NULL,
  `last_ping_timetaken` double(8,2) DEFAULT NULL,
  `purpose` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `serial` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `poller_group` int(11) NOT NULL DEFAULT 0,
  `override_sysLocation` tinyint(1) DEFAULT 0,
  `notes` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `port_association_mode` int(11) NOT NULL DEFAULT 1,
  `max_depth` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`device_id`),
  KEY `status` (`status`),
  KEY `hostname` (`hostname`),
  KEY `sysName` (`sysName`),
  KEY `os` (`os`),
  KEY `last_polled` (`last_polled`),
  KEY `last_poll_attempted` (`last_poll_attempted`)
) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
root@librenms0:/tmp# perl pl.pl librenms devices
Table: devices DEFAULT CHARSET utf8 COLLATION utf8_unicode_ci (bytes per char: 3)
bytes:	4	device_id	INT(10)
bytes:	385	hostname	VARCHAR(128) COLL utf8_unicode_ci
bytes:	385	sysName		VARCHAR(128) COLL utf8_unicode_ci
bytes:	17	ip		VARBINARY(16)
bytes:	766	community	VARCHAR(255) COLL utf8_unicode_ci
bytes:	1	authlevel	ENUM(3 : 'noAuthNoPriv','authNoPriv','authPriv') COLL utf8_unicode_ci
bytes:	193	authname	VARCHAR(64) COLL utf8_unicode_ci
bytes:	193	authpass	VARCHAR(64) COLL utf8_unicode_ci
bytes:	1	authalgo	ENUM(2 : 'MD5','SHA') COLL utf8_unicode_ci
bytes:	193	cryptopass	VARCHAR(64) COLL utf8_unicode_ci
bytes:	1	cryptoalgo	ENUM(3 : 'AES','DES','') COLL utf8_unicode_ci
bytes:	13	snmpver		VARCHAR(4) COLL utf8_unicode_ci
bytes:	2	port		SMALLINT(5)
bytes:	49	transport	VARCHAR(16) COLL utf8_unicode_ci
bytes:	4	timeout		INT(11)
bytes:	4	retries		INT(11)
bytes:	1	snmp_disable	TINYINT(1)
bytes:	4	bgpLocalAs	INT(10)
bytes:	385	sysObjectID	VARCHAR(128) COLL utf8_unicode_ci
bytes:	10	sysDescr	TEXT COLL utf8_unicode_ci
bytes:	10	sysContact	TEXT COLL utf8_unicode_ci
bytes:	10	version		TEXT COLL utf8_unicode_ci
bytes:	10	hardware	TEXT COLL utf8_unicode_ci
bytes:	10	features	TEXT COLL utf8_unicode_ci
bytes:	4	location_id	INT(10)
bytes:	97	os		VARCHAR(32) COLL utf8_unicode_ci
bytes:	1	status		TINYINT(1)
bytes:	151	status_reason	VARCHAR(50) COLL utf8_unicode_ci
bytes:	1	ignore		TINYINT(1)
bytes:	1	disabled	TINYINT(1)
bytes:	8	uptime		BIGINT(20)
bytes:	4	agent_uptime	INT(10)
bytes:	4	last_polled	TIMESTAMP
bytes:	4	last_poll_attempted	TIMESTAMP
bytes:	8	last_polled_timetaken	DOUBLE(5,2)
bytes:	8	last_discovered_timetaken	DOUBLE(5,2)
bytes:	4	last_discovered	TIMESTAMP
bytes:	4	last_ping	TIMESTAMP
bytes:	8	last_ping_timetaken	DOUBLE(8,2)
bytes:	10	purpose		TEXT COLL utf8_unicode_ci
bytes:	61	type		VARCHAR(20) COLL utf8_unicode_ci
bytes:	10	serial		TEXT COLL utf8_unicode_ci
bytes:	766	icon		VARCHAR(255) COLL utf8_unicode_ci
bytes:	4	poller_group	INT(11)
bytes:	1	override_sysLocation	TINYINT(1)
bytes:	10	notes		TEXT COLL utf8_unicode_ci
bytes:	4	port_association_mode	INT(11)
bytes:	4	max_depth	INT(11)
total:	3828	least: 174	columns: 48

total: 3828 least: 174 columns: 48
You are not reaching the limit. There is a bug somewhere.
Needs to know at which level (librenms or mariadb)

Could you try adding manually:
alter table devices add disable_notify tinyint(1) not null default '0';

Then dropping:
alter table devices drop COLUMN disable_notify;

MariaDB [librenms]> alter table devices add disable_notify tinyint(1) not null default '0';
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

So it is a mariadb bug