siffring,
Below is Derek’s response in this thread as to the why part.
The maximum number of columns per table is likely being reached, or more specifically, the maximum row width. There’s a hard limit of 4096 columns per table, but as the MySQL documentation puts it: “the exact limit depends on several interacting factors.” Primarily, the length of a given row cannot exceed 64k. For utf8, for instance, VARCHAR fields contribute their length * 3 bytes to allocate enough space for the row.
Each ExpressionEngine custom field has at least two columns, typically 1 TEXT field to hold the contents, and 1 VARCHAR field to hold the field’s formatting type. The content column contributes only 9-12 bytes to the row length, because MySQL stores TEXT fields elsewhere. The formatting field column contributes up to 122 bytes to the row width (length of 40 times 3 in the case of a utf8 database, plus two bytes to store the length). Date fields and relationship fields are stored a bit differently, but the point is: you’re never likely to hit MySQL’s limit on the number of columns per table because the columns each contribute to the maximum row width.
So let’s say you have 520 custom fields, and assume that your database is utf8:
bytes from
6240 520 content columns
63400 520 field formatting columns
————————————————————
69640 bytes
Matrix I know now has its own tables for columns and data but it would be worth hearing Brandon’s take on this as I am not overly intimate his add-ons inner workings. The relationship table which Playa uses can be resource intensive too in terms of its size. If you clear your cache before duplicating a site does the error appear?
There is one suggestion that after backing up your database that you try is flipping from MyISAM to InnoDB
Other than that unfortunately you may need a rethink on some of your fields and how you approached the content.