Gitlab CI failed to connect to several number of services

Hi! I have my continious delivery on gitlab-ci. It builds my project.
For the last couple of days, I see that Gitlab CI cannot install needed dependencies while running.

Sometimes, it failed to connect to, but Rubygems is working good.
Sometimes, it failed to connect, but it is also working good!!

What is going on? How can I fix it?