Thanks Randy - I have used that and deleted a couple of circular relationships.
Further testing on the dev platform has revealed the issue appears to be a bug (or perhaps unexpected behaviour is a better word) relating to suspended users.
We create many users via
LDAP and after they go their own way we suspend them, rather than delete them. That way any existing student or teacher enrolments and associated data are maintained.
However, whilst these users are enrolled in "Parent Course 1" the course meta-link also enrols them in "Child Course 1 and 2". Course meta-link adds the enrolment as a part of the cron job to Child 1 and 2 (let's call that phase 1) and then deletes the enrolment as a part of the same cron job (phase 2).
So with the cron job running once an hour, that equates to hundreds of thousands of enrolments and un-enrolments per day, consuming significant
database connections and processing resources.
Not sure if anyone else is suspending users which are still enrolled in a Parent Course and finding this behaviour - if yes I think I will raise this as a tracker.