Oh god not THAT one! GRR! It's the bane of my existence! The only valid explanation I've heard is that in some regions, the wi-fi and routers work slightly differently, so sometimes a connection can't be made. But in your case for it to happened very time is just weird.
And moving closer to the router wont' work, guys. You already have to be connected in order to even GET the error in the first place, it shows up when you're trying to visit someone else's town. Otherwise Porter would tell you "Unable to establish an internet connection."