When a virtual server with channels deeper than 15 levels is deleted from master server running mysql the master will crash due to SQL error.
This is caused by innodb's max self referential limit being 15, above this the on delete cascade fails e.g.
<F>2012-09-01 00:02:18.694 SQL Error [DELETE FROM
server_id = ?]: Cannot delete or update a parent row: a foreign key constraint fails (
29441_channels_parent_del FOREIGN KEY (
channel_id) ON DELETE CASCADE) QMYSQL3: Unable to execute statement.
This limitation is documented here:-
"Deviation from SQL standards: Cascading operations may not be nested more than 15 levels deep."
I see two possible fixes:-
1. Removing the constraint and processing channel delete's manually
2. Limit the depth of channels that can be created to match the underlying storage e.g. on mysql max 15.