Wow, I don't think I've ever heard of RAM causing a system to reboot randomly at night (but selectively NOT during stress testing). I guess I'm lucky in that sense. Either the RAM was good, or it was chock full of errors. Sounds more like a power delivery issue if it's slowly degrading over time tbh.
Bookmarks