Updated on 2023-11-21 GMT+08:00

Database Connection

When the maximum number of mongod connections is reached, your client cannot connect to the GeminiDB Mongo instances. In the mongod service model, each network connection uses a single thread of 1 MB stack space. As the network connections increase, too many threads will increase the context switch overhead and memory usage.

  • When your clients use the GeminiDB Mongo driver to connect to databases, a connection pool must be configured. The maximum number of connections in a connection pool cannot exceed 200.
  • When your clients use the GeminiDB Mongo driver to connect to databases, calculate the number of clients and the size of the connection pool configured for each client. The total number of connections cannot exceed 80% of the maximum number of connections.
  • For a replica set, configure the IP addresses of both the primary and secondary nodes on the client.
  • GeminiDB Mongo provides the rwuser user by default. The authentication database must be admin when the rwuser user is used for login.