Need more testing but seems like i've fixed the problem.
Run gpedit.msc
Computer Configuration -> Administrative Templates -> System -> Troubleshooting and Diagnostics -> Windows Resource Exhaustion Detection and Resolution
Set to disabled
I guess it's because i'm not running a normal version of win 10 and it's configured different by default.
EDIT: Spoke too soon, still happens.