Failed to connect to servers

I am trying to use unity match maker services . When i try to connect online, it will say connecting then after the 2 minutes it will say failed to connect to the server. I am not sure whats happening.

Do you use IServerQueryHandler’s “UpdateServerCheck” method? If not, the server will shut down after a while after starting.
Also could you share some code?