<blockquote>
  <p>I also tried to change the table engine to MyISAM</p>
</blockquote>

<p>That won't work because Craft relies on foreign key constraints that InnoDB provides and MyISAM doesn't support.</p>

<p>There might be some server config/changes you can do to address the issue, but because you're bumping into MySQL/InnoDB limitations, I'd try to address this from an information architecture point of view.</p>

<p>i.e. You've likely got a lot of fields that are probably ending up as <code>text</code> data types in MySQL.  Can you change those to fields that use <code>varchar</code> instead?  Can you logically break up the fields so they make sense inside of a Matrix field?  Matrix fields get their content stored in their own table outside of the main <code>craft_content</code> table, which is where you're likely running into that error.</p>

CC BY-SA 3.0
2018-01-14T23:26:16.017Z
As you suggested I have changed the architecture of the fields and broke one single structure to more and called for content from all of them. Now it works. Thank you.
md333
CC BY-SA 3.0
2018-01-03T18:52:33.933Z
2018-01-03T18:52:33.933Z
Brad Bell
<p>Trying to publish changes in one of 3 locales of an entry gives error:</p>
<blockquote>
<p>Internal Server Error
CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1030 Got error 139 from storage engine</p>
</blockquote>
<p>It is basically a row size problem.</p>
<p>The entry has many fields and there are 3 locales. It is possible to save a draft of the changes made.</p>
<p><strong>What i tried:</strong></p>
<p>On staging server I have solved the problem with changing the database config</p>
<blockquote>
<p>innodb_file_per_table=1</p>
<p>innodb_file_format = Barracuda</p>
</blockquote>
<p>and then changing row format of some tables (entries, content and fields) to compressed.</p>
<p>This is not possible on live production server since host does not allow it. And also it probably is not the best solution.</p>
<p>I also tried to change the table engine to MyISAM but this gave error:</p>
<blockquote>
<p>SQL Error [1217] [23000]: Cannot delete or update a parent row: a foreign key constraint fails</p>
</blockquote>
<p>I hope there is a simple solution to all this.<br />
Thank you for your help, I am a bit green in all this, my background is in design.</p>

<mysql>
Publishing entry returns Internal Server Error (1030 Got error 139)
# Publishing entry returns Internal Server Error (1030 Got error 139)

(Asked by: username_0 on 2018-01-03)

Trying to publish changes in one of 3 locales of an entry gives error:

> Internal Server Error
> CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1030 Got error 139 from storage engine

It is basically a row size problem.

The entry has many fields and there are 3 locales. It is possible to save a draft of the changes made.

**What i tried:**

On staging server I have solved the problem with changing the database config

> innodb\_file\_per\_table=1
>
> innodb\_file\_format = Barracuda

and then changing row format of some tables (entries, content and fields) to compressed.

This is not possible on live production server since host does not allow it. And also it probably is not the best solution.

I also tried to change the table engine to MyISAM but this gave error:

> SQL Error [1217] [23000]: Cannot delete or update a parent row: a foreign key constraint fails

I hope there is a simple solution to all this.  
Thank you for your help, I am a bit green in all this, my background is in design.

**Tags:** mysql


---

## 1 answers

### Answer by username_1 on 2018-01-03. Score: 0 | Accepted answer

> I also tried to change the table engine to MyISAM

That won't work because Craft relies on foreign key constraints that InnoDB provides and MyISAM doesn't support.

There might be some server config/changes you can do to address the issue, but because you're bumping into MySQL/InnoDB limitations, I'd try to address this from an information architecture point of view.

i.e. You've likely got a lot of fields that are probably ending up as `text` data types in MySQL. Can you change those to fields that use `varchar` instead? Can you logically break up the fields so they make sense inside of a Matrix field? Matrix fields get their content stored in their own table outside of the main `craft_content` table, which is where you're likely running into that error.

> **Comments:**
> **username_0**: As you suggested I have changed the architecture of the fields and broke one single structure to more and called for content from all of them. Now it works. Thank you.  

---

