The service is currently unavailable

I keep getting a message The service is currently unavailable when using gemini. It will be half way through making changes when it just stops and shows this error. Is there anything I can do to prevent this?