Troubleshoot Connection Issues

This page outlines common connection issues and possible resolutions.

Cluster Connect button is disabled

Your cluster Connect button may be disabled if your cluster is in the provisioning state. Your cluster needs to provision when it is first deployed, or when it is scaled up or down. The provisoning process can take up to 10 minutes, after which the Connect button will become enabled.

Too many open connections to your cluster

Atlas sets the limit for concurrent incoming connections to a cluster based on the cluster tier. If you try to connect when you are at this limit, MongoDB displays an error stating “connection refused because too many open connections”.

For a detailed comparision of cluster tiers and their maximum concurrent connections, see Connection Limits and Cluster Tier.

Possible Solutions

  • Close any open connections to your cluster not currently in use.
  • Scale your cluster to a higher tier to support more concurrent connections.
  • Restart your application.
  • To prevent this issue in the future, consider utilizing the maxPoolSize connection string option to limit the number of connections in the connection pool.

See also

For more details on fixing this issue, see the Connection Alerts page.

Authentication to the cluster failed

To connect to Atlas, you must authenticate with a MongoDB user. To create a MongoDB user for your cluster, see Configure MongoDB Users.

Possible Solutions

If you have created a user and are having trouble authenticating, try the following:

  • Check that you are using the correct username and password for your MongoDB user, and that you are connecting to the correct cluster.
  • Check that you are specifying the correct authSource database in your connection string.
  • If you have a special character in your password, see Special characters in connection string password.

Attempting to connect to a cluster from behind a firewall

Atlas clusters operate on port 27017. You must be able to reach this port to connect to your clusters.

To check your ability to reach this port, visit If you cannot access port 27017, check your system firewall settings and ensure they are not blocking access to this port.

Special characters in connection string password

If you have special characters in your connection string password, you must encode those characters. For a complete list of special characters and their corresponding encodings, see the ASCII Codes Table. Use the corresponding Hex value for your characters.


If your password in plain-text is p@ssw0rd'9'!, you would need to encode your password as:


Connection string incompatible with driver version

If you see this error message, your driver is likely out of date. For instructions on updating your driver, refer to your specific Driver Documentation.

MongoDB Compass Troubleshooting

If you are using MongoDB Compass to connect to your cluster, you can visit the Compass Connection Errors page for additional troubleshooting resources.

Other Issues

If you are still experiencing cluster connection issues, please contact support using the chat button in the bottom right corner of Atlas.