Easiest way to get this to happen is to get the game to spawn in more and more enemies. It started happening to me during a prolonged battle with the beta station and my swarm of fighter craft. It took a long time to take it down, and that caused the engine to spawn large amounts of enemies over a course of time.
Or you could try initiate_wave, however I never tested this, and it would not be the exact same conditions.
When you are fighting for a long time, you will begin to notice that your fleet is not able to take out at least some of your enemies. Upon close inspection you will find that none of your attacks will actually deal damage, and a portion of these invulnerable ships will start lagging out. It suggests a server desync, but I cannot be sure.
The other problem is that ships with rails have an unfortunate tendency to glitch out, causing an NAN message to pop up. This may explain part of the reason my game bugged out. Minutes after the first NAN, I noticed that no ships were moving or rendered, that were just empty markers. It was as if part of the server collapsed. The link I provided includes my experience with the NAN bug firsthand and my notes on it. I am uncertain why the NAN bug exists, so I cannot adequately explain how to reproduce it. It just happens.