Nextcloud Social : MySQL error 1118 on oc_social_3_stream

My YunoHost server

(copied from diagnosis)
Hardware: x86-64 container on Proxmox
Server is running Linux kernel 5.4.65-1-pve
Server is running Debian 10.7
YunoHost version:
Server is running YunoHost 4.1.5 (stable)
yunohost version: 4.1.5 (stable)
yunohost-admin version: 4.1.4 (stable)
moulinette version: 4.1.4 (stable)
ssowat version: 4.1.2 (stable)

I have access to my server : Through SSH | through the webadmin |
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

I upgraded Yunohost and applications a while back. I had not yet upgraded the Nexctloud-apps, and started doing that now.

I think Nextcloud went from version 18 to 20 (18 I’m not quite sure, it is now the latest Yunohost version, 20.0.4).

Nextcloud social got disabled. I tried enabling it, but that gave an error while adding columns to the table oc_social_3_stream :

An exception occurred while executing 
'ALTER TABLE oc_social_3_stream ADD nid BIGINT UNSIGNED DEFAULT NULL, ADD chunk SMALLINT UNSIGNED DEFAULT 1 NOT NULL': 
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 

On the internet people have been having errors like that in the past, for other tables. I was not quite sure what my options were at this point, and since there has not been a lot of communication via the social thing, I removed Nextcloud Social so that I could re-install it.

It seems that removing the app does not remove the tables: when I add the app, I get the same error.

I had a look at the current table layout, but I can’t find the definition of the data model on Github so I am not sure which part I should drop/change/ignore

su mysql 
(change to MySQL user, login to MySQL)
mysql 
show databases; 
(yes, nextcloud is there)
use nextcloud;
(show the current layout of the table, see if there's anything obvious to change)
show columns from  oc_social_3_stream;
(not for now..)
exit;
(another thread somewhere suggested repairing the database)
cd /var/www/nextcloud/
chmod +x occ
sudo -u nextcloud ./occ maintenance:repair

After the repair the problem persists.

Actually, there’s a whole bunch of tables that seem related to alpha2 (?) and to version (alpha, as well?) 3 of Nextcloud Social; the current version is supposed to be 4.

They look like this :

MariaDB [nextcloud]> show columns from  oc_social_a2_stream;
+--------------------+---------------+------+-----+---------+-------+
| Field              | Type          | Null | Key | Default | Extra |
+--------------------+---------------+------+-----+---------+-------+
| id_prim            | varchar(128)  | NO   | PRI | NULL    |       |
| id                 | varchar(1000) | YES  |     | NULL    |       |
| type               | varchar(31)   | NO   |     | NULL    |       |
| to                 | varchar(1000) | NO   |     | NULL    |       |
| to_array           | longtext      | NO   |     | NULL    |       |
| cc                 | longtext      | NO   |     | NULL    |       |
| bcc                | longtext      | NO   |     | NULL    |       |
| content            | longtext      | NO   |     | NULL    |       |
| summary            | longtext      | NO   |     | NULL    |       |
| published          | varchar(31)   | NO   |     | NULL    |       |
| published_time     | datetime      | YES  |     | NULL    |       |
| attributed_to      | varchar(1000) | YES  |     | NULL    |       |
| in_reply_to        | varchar(1000) | YES  |     | NULL    |       |
| activity_id        | varchar(1000) | YES  |     | NULL    |       |
| object_id          | varchar(1000) | YES  |     | NULL    |       |
| hashtags           | varchar(1000) | YES  |     | NULL    |       |
| source             | longtext      | NO   |     | NULL    |       |
| instances          | longtext      | NO   |     | NULL    |       |
| attachments        | longtext      | YES  |     | NULL    |       |
| cache              | longtext      | NO   |     | NULL    |       |
| creation           | datetime      | YES  |     | NULL    |       |
| local              | tinyint(1)    | NO   |     | 0       |       |
| hidden_on_timeline | tinyint(1)    | NO   |     | 0       |       |
| details            | longtext      | YES  |     | NULL    |       |
| subtype            | varchar(31)   | YES  |     | NULL    |       |
+--------------------+---------------+------+-----+---------+-------+
25 rows in set (0.002 sec)

and

MariaDB [nextcloud]> show columns from  oc_social_3_stream;
+--------------------+---------------+------+-----+---------+-------+
| Field              | Type          | Null | Key | Default | Extra |
+--------------------+---------------+------+-----+---------+-------+
| id_prim            | varchar(128)  | NO   | PRI | NULL    |       |
| id                 | varchar(1000) | YES  |     | NULL    |       |
| type               | varchar(31)   | YES  |     |         |       |
| subtype            | varchar(31)   | YES  |     |         |       |
| to                 | varchar(1000) | YES  |     |         |       |
| to_array           | longtext      | YES  |     | NULL    |       |
| cc                 | longtext      | YES  |     | NULL    |       |
| bcc                | longtext      | YES  |     | NULL    |       |
| content            | longtext      | YES  |     | NULL    |       |
| summary            | longtext      | YES  |     | NULL    |       |
| published          | varchar(31)   | YES  |     |         |       |
| published_time     | datetime      | YES  |     | NULL    |       |
| attributed_to      | varchar(1000) | YES  |     |         |       |
| attributed_to_prim | varchar(128)  | YES  | MUL |         |       |
| in_reply_to        | varchar(1000) | YES  |     |         |       |
| in_reply_to_prim   | varchar(128)  | YES  | MUL |         |       |
| activity_id        | varchar(1000) | YES  |     |         |       |
| object_id          | varchar(1000) | YES  |     |         |       |
| object_id_prim     | varchar(128)  | YES  | MUL |         |       |
| hashtags           | longtext      | YES  |     | NULL    |       |
| details            | longtext      | YES  |     | NULL    |       |
| source             | longtext      | YES  |     | NULL    |       |
| instances          | longtext      | YES  |     | NULL    |       |
| attachments        | longtext      | YES  |     | NULL    |       |
| cache              | longtext      | YES  |     | NULL    |       |
| creation           | datetime      | YES  |     | NULL    |       |
| local              | tinyint(1)    | YES  |     | 0       |       |
| filter_duplicate   | tinyint(1)    | YES  |     | 0       |       |
+--------------------+---------------+------+-----+---------+-------+
28 rows in set (0.002 sec)

There’s a closed issue on Github that handles an error 1118 for another table. There the solution is in a linked patch, but while I can read/write SQL, I can not understand enough of PHP to read the patch and make something that I can apply here.

Another issue on Github suggests changing a varchar column to text, but I’m not quite sure which column(s) I could convert and whether it would give problems with integrity/datatypes on other tables.

Any suggestion? If you have successfully upgraded the Social app, would you post your table layout for oc_social_*_stream (any variants)?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.