I did try to change the user_id of the domain (after this error started occuring), but changed it back when it didnt help. Now I removed the domain and re-added it with the original user and it seems to work for now. I'll keep watching for changes.

I think the cron is working properly now though.

I think it's isp_nodes and isp_dep tables which controls client and site relations. However, is there any schematics on how it is done?