Probably you still have a lot in your memory which doesnt have any space left over to continue with the process. I would say look to ways to reduce the objects kept in memory by
1 - reduce the batch limit
2 - commit your changes before a new batch
3 - clear your committed list after a commit
4 - if you still have OOM-error I would consider breaking up the changes in multiple process queues to control more the heavy load