It's likely that the powering off is caused by your CPU overheating. It's a defense mechanism built into chips to stop them from blowing.