I face this issue multiple time in my project. Reason behind this may be:
1. Your proxy/VPN not connected. try disconnect and connect again.
2. your module is big in size that can also cause this issue. Just reopen this module.
3. try pinging your environment on command prompt.