What you can try is to change these two settings:
For exception 1 what you can try is to decrease the batch size for DraftMigrationBatchSize (Default is 5000)
<add key="ecf:DraftMigrationBatchSize" value="10000" />
For exception 2 what you can try is to decrease the batch size for RemoveOrphanedMetaKeysBatchSize (Default is 10,000)
<add key="ecf:RemoveOrphanedMetaKeysBatchSize" value="1000" />