Server connection timed out after 15 seconds error

recently I’ve been getting this error “Server connection timed out after 15 seconds” anyone know how to stop it from happening?

It’s either a restart, or the internet connection on the hosting Is not very good. That’s what I found out anyway, through past experience.