Q:

Is there a maximum number of sites you can run off MSM?

I currently have MSM running 8 sites. Last week I had to create a new site and I experienced a whole host of issues, from addons not working as expected to show stopping database errors. It took 4 goes to get it working.
Does anyone have any experience on running more than 10 sites using MSM?
Does anyone know how I might split the main parent site into its own EE but share the content and members with other installations of EE and MSM?
Does anyone have any other suggestions?
Thanks.

A:

There is a hard limit of 4096 columns in a MySQL table. Each site in MSM creates additional columns in the exp_channel_data table: 2 columns for each custom field. If you work out how many custom fields you have, double that number and divide it into 4096 and round down you will end up with an approximate maximum for the number of sites that is possible:
Maximum no of sites = 4096 / [No of custom fields] * 2

Note that other factors can effect the maximum number of columns permissable, such as the total allowed row size in a MySQL table (65,535 bytes) [1]
For this reason, MSM is not really a scalable solution to the problem of multiple sites which share data. You might be better off sharing data with a parent/base site via an API [2]. 
Alternatively, you could investigate assigning fieldgroups created in site 1 to channels created in site X, so that those database columns are reused rather than duplicated. This can be done by manually editing the field_group value assigned to a channel in the exp_channel table. Surprisingly, the CP publish/edit forms work as expected with this change. However, I haven't investigated how this would impact tags used in front-end templates.
[1] http://dev.mysql.com/doc/refman/4.1/en/column-count-limit.html
[2] http://docs.eeopenapi.apiary.io/

