I'm using the mysql2 node package (v1.2.0) in a web application and when I'm stepping through the code using the debbugger (using webstorm), if I sit too long at certain breakpoints, initiating the connection will sometimes time out.
Here's the message I receive when it times out:
Error: connect ETIMEDOUT
at Connection._handleTimeoutError (/Volumes/github-image/bitcoin-core/node_modules/mysql2/lib/connection.js:179:13)
at ontimeout (timers.js:365:14)
at tryOnTimeout (timers.js:237:5)
at Timer.listOnTimeout (timers.js:207:5)
I was hoping to increase the timeout to avoid this issue. I tried adding a custom timeout value for when the connection is set up.
export const connection = mysql.createConnection({
host: dbHost,
user: dbUser,
password: dbPassword,
database: dbName,
timeout: 60000
});
But this had no effect.