Node-Mysql throwing connection timeout
问题 My node.js app gives 5xx due to connection timeouts at random times. Here's how I connect and query: var mysql = require('mysql'); var config = { host: '172.10.1.1', port: 3306, user: 'user', password: 'pwd', database: 'mydb', connectionLimit: 15, queueLimit: 30 } var poolCluster = mysql.createPool(config); var queryDB = function(query, cb) { poolCluster.getConnection(function(err, connection) { if(err) { cb(err, null); } else { connection.query(query, function (err, rows) { connection