require('dotenv').config();
const mysql = require('mysql2/promise');
module.exports = mysql.createConnection({
host: 'localhost',
user: 'sam',
password: 'Virginia107',
database: 'RVABot',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
maxIdle: 0, // Disable maxIdle - connections stay in the pool even if idle
idleTimeout: 60000, // Close idle connections after 60 seconds (should be much less than MySQL's wait_timeout)
enableKeepAlive: true // Enable TCP keep-alive packets
});
require('dotenv').config();
const mysql = require('mysql2/promise');
module.exports = mysql.createConnection({
host: 'localhost',
user: 'sam',
password: 'Virginia107',
database: 'RVABot',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
maxIdle: 0, // Disable maxIdle - connections stay in the pool even if idle
idleTimeout: 60000, // Close idle connections after 60 seconds (should be much less than MySQL's wait_timeout)
enableKeepAlive: true // Enable TCP keep-alive packets
});