lsc 23 hours ago
parent
commit
43bf00eadd
1 changed files with 4 additions and 4 deletions
  1. 4 4
      mysql.js

+ 4 - 4
mysql.js

@@ -16,7 +16,7 @@ us.mysqlconnection = function (host, database) {
         // let port = host == '123.58.32.152' ? 20330 : 20007;
         // let port = host == '123.58.32.152' ? 20330 : 20007;
         us.sqle[host] = us.sqle[host] || {};
         us.sqle[host] = us.sqle[host] || {};
         us.sqle[host][database] = us.mysql.createPool({
         us.sqle[host][database] = us.mysql.createPool({
-            connectionLimit: 100000,
+            // connectionLimit: 100000,
             queueLimit: 100000,
             queueLimit: 100000,
             host: host, //数据库地址
             host: host, //数据库地址
             // host: '123.58.32.151', //数据库地址
             // host: '123.58.32.151', //数据库地址
@@ -26,9 +26,9 @@ us.mysqlconnection = function (host, database) {
             database: database, //数据库名称
             database: database, //数据库名称
             // port: 20007 //端口
             // port: 20007 //端口
             port: port, //端口
             port: port, //端口
-            // connectionLimit: 10,
-            // connectTimeout: 60000, // 超过此时间连接会失败
-            // acquireTimeout: 60000, // 获取连接的超时时间
+            connectionLimit: 10,
+            connectTimeout: 60000, // 超过此时间连接会失败
+            acquireTimeout: 60000, // 获取连接的超时时间
         }); //连接超时和错误从连
         }); //连接超时和错误从连
     }
     }
     //connectionLimit: 1000, 
     //connectionLimit: 1000,