connection.ConnectionTimeout=0; Setting timeout value as 0 will change defialt timeout to infinite.
var mysqltest = require('mysql'); var pool = mysqltest.createPool({host : ‘host.org',user : 'username',password : 'password' });exports.getUsers = function(callback) {pool.getConnection(function(err, connection) {if(err) { console.log(err); callback(true); return; }var sqlQuery = "SELECT id,name FROM users";connection.query(sqlQuery, [], function(err, results) {connection.release(); // always put connection back in pool after last queryif(err) { console.log(err); callback(true); return; }callback(false, results);});}); });