Common Parameter Configuration on the Driver Side
Common Configuration Items and Recommended Values for Connecting to a DDS DB Instance
- connectTimeoutMS: This connection timeout parameter prevents infinite waiting of the driver during the connection. Recommended configuration:
connectTimeoutMS = 10000ms
- socketTimeoutMS: This parameter prevents infinite waiting of TCP communication. Recommended configuration:
The duration is two to three times the maximum service duration. The minimum duration is 10s.
socketTimeoutMS = max(10000ms, 3 times the maximum service time)
- minPoolSize: minimum number of connections in the connection pool. Recommended configuration:
minPoolSize = 10
- maxPoolSize: maximum number of connections in the connection pool. Recommended configuration:
maxPoolSize = 50 - 100
- maxIdleTimeMS: maximum idle duration that a connection can remain in the pool before it is deleted and closed. Recommended configuration:
maxIdleTimeMS = 10000ms
Do not use socketTimeoutMS to prevent an operation from running for a long time on the database side. maxTimeMS is required so that the server can cancel operations that have been abandoned by the client.