Is it still crashing with that code in it? If yes, how does it crash, does the server just stop responding or does it actually crash with an error?
I would seriously suggest that you fix the two major issues I mentioned in my last post (for all of your while loops) and see if that fixes your problem.
It just makes the game stop responding after being executed