I'm running a self-hosted Appwrite 1.8.1 instance and encountering an issue when creating fulltext indexes on a collection.
The Problem:
Fulltext index creation fails with this error in appwrite-worker-databases logs:
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.
MariaDB logs show:
InnoDB: Cannot add field `FTS_DOC_ID` in table because after adding it,
the row size is 8132 which is greater than maximum allowed size (8126 bytes)
Root Cause:
My collection has ~100 string attributes. With UTF8MB4 encoding, each VARCHAR(n) uses up to n * 4 bytes. The total row size exceeds InnoDB's 8,126 byte limit, so MariaDB cannot add the hidden FTS_DOC_ID column required for fulltext indexes.
My Workaround: I manually converted several large VARCHAR columns to TEXT in MariaDB:
ALTER TABLE _14_database_2_collection_3
MODIFY COLUMN psedescription TEXT,
MODIFY COLUMN notes TEXT,
-- ... etc
This reduced the row size below the limit and fulltext indexes now work. However:
- Editing these attributes in the Appwrite console reverts them to VARCHAR
- I need to avoid running migrations that might revert the changes
Questions for the team:
- Is there a recommended way to handle collections with many string attributes that exceed the row size limit?
- Would Appwrite consider using TEXT instead of VARCHAR for larger string attributes (e.g., size > 255)?
- Is there a safe way to persist these column type changes so they survive attribute edits and migrations?
- Any other recommendations for this use case?
Environment:
- Appwrite 1.8.1 (self-hosted)
- MariaDB 10.11
- Collection has ~100 attributes, mostly strings
Thanks for any guidance!
Recommended threads
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this