To resolve this issue, you will need to sync the custom entities one by one so that the sync is not bottlenecked.
If that does not resolve the issue, check how many fields are enabled for the custom entity.
A large amount of fields can cause a bottleneck, try to reduce the amount to have only necessary fields.