This commit is contained in:
2025-10-29 18:25:17 +08:00
parent 66b381bffe
commit 23580470be

View File

@@ -13,7 +13,6 @@ const authSource = 'admin'; // 认证数据库,通常是 admin
const uri = `mongodb://${username}:${password}@${host}:${port}/?authSource=${authSource}`;
const client = new MongoClient(uri, {
dbName: dbName,
maxPoolSize: 10, // 连接池最大连接数
serverSelectionTimeoutMS: 5000, // 服务器选择超时时间
socketTimeoutMS: 45000, // Socket 超时时间