when you run top, hit M to sort by memory usage. that will show what processes are using the most amount of memory and you can then debug from there.