When it happens we should also check there is no other Unreal tool running ; I got the same without having any editor open, but the Swarm Agent.
I closed it then it worked fine.
I have struggled with this for months! In the end it was my RAM that was faulty. Do yourself a favour and google a memory test you can use and run it overnight. Windows memory diagnostic is not very reliable.
Even if there is 1 error with your RAM (which I had) you will need to replace it
Once I replaced my RAM and reinstalled Epic games and Fortnite I have been playing nonstop without any issues!