That's the nature of private servers — they're riddled with bugs, and crashes on high-load encounters like guard fights or dense mob pulls are among the most common symptoms. There's usually no clean fix from the player side, since the fault sits in the server's own code.
The straightforward recommendation is to play on the official live servers instead. They're stable, properly supported, and you won't lose progress to a crash.