Stuck on "Retrieving Server Info"

I am having an issue with my server,sometimes after it has been on for a while people are not able to join it anymore and get stuck on “retrieving server info”.How can I fix this?

restart your server.

Yeh,I tried that and it worked.But is there anyway to prevent this from happening in the future?