The way that images are stored changed a while back and they’re all being processed. There’s stuff that’s supposed to keep it from crashing x but it’s not enough for you. I would recommend increasing your ram for a while until they’re all done.
I think that there is a site setting that controls how many images are processed in a batch, but can’t quite remember what it is this instant.