I tried increasing my swap partition to 4GB and still got memory exhaustion. I don’t understand memory management in Linux well enough to know if I did this correctly. It appeared to me that the swap space wasn’t being used, but I’m out of my depth here.
The only way I’ve been able to fix this is to trash the data directory and start from empty. It takes MUCH longer to start, but doesn’t suffer the same problems.