<p>I have set up several globals to store the URLs of a company’s social media accounts. Each one is a plain text field, and each one is limited to 254 characters.</p>
<p>This works fine with three of them, but when I came to limit the length of the link for twitter I get this error:</p>
<pre><code>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 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
The SQL being executed was: ALTER TABLE `content` CHANGE `field_twitterLink` `field_twitterLink` varchar(1016)
</code></pre>
<p>I have tried this several times, and I am definitely not hitting a key accidentally, the amount I’m entering is 254, the field is plain text. This matches the other fields that worked correctly.</p>
<p>If I omit the length, it works. And it works on the other links.</p>
<p>It’s not a catastrophe, but I would like to understand what’s going wrong. Any insights appreciated.</p>

CC BY-SA 4.0
2020-09-14T18:20:04.440Z
How many fields does your installation have? I wonder if you might be hitting the MySQL column limit. I once reached it on a multi-site Craft-2 installation with around 500 fields.
James Smith
CC BY-SA 4.0
2020-09-14T21:56:05.120Z
Does this answer your question? [Internal Server Error: SQLSTATE\[42000\] 1118 Row size too large](https://craftcms.stackexchange.com/questions/11480/internal-server-error-sqlstate42000-1118-row-size-too-large)
Brad Bell
<error-message><error><globals>
Error when setting field length on global
# Error when setting field length on global

(Asked by: username_0 on 2020-09-14)

I have set up several globals to store the URLs of a company’s social media accounts. Each one is a plain text field, and each one is limited to 254 characters.
This works fine with three of them, but when I came to limit the length of the link for twitter I get this error:
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 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
The SQL being executed was: ALTER TABLE `content` CHANGE `field_twitterLink` `field_twitterLink` varchar(1016)

I have tried this several times, and I am definitely not hitting a key accidentally, the amount I’m entering is 254, the field is plain text. This matches the other fields that worked correctly.
If I omit the length, it works. And it works on the other links.
It’s not a catastrophe, but I would like to understand what’s going wrong. Any insights appreciated.

**Tags:** error-message, error, globals
> **Comments:**
> **username_1**: How many fields does your installation have? I wonder if you might be hitting the MySQL column limit. I once reached it on a multi-site Craft-2 installation with around 500 fields.  
> **username_2**: Does this answer your question? [Internal Server Error: SQLSTATE\[42000\] 1118 Row size too large](https://craftcms.stackexchange.com/questions/11480/internal-server-error-sqlstate42000-1118-row-size-too-large)  

---

## 0 answers

