-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Description
I'm getting the following error after installing mariadb
as replacement for mysql2
. The weird part is that it works during the initial npm install
but when I restart the computer I get this error. I think there might be a configuration issue which is not letting it connect to the mysql database during startup.
Is there a way to get an error on why it's not getting the connection from the pool?
not connected due to error: SqlError: (conn=-1, no: 45028, SQLState: HY000) retrieve connection from pool timeout after 10001ms (pool connections: active=0 idle=0 limit=5)
const pool = mariadb.createPool({
host: "127.0.0.1",
user: process.env.DB_USER,
password: process.env.DB_PASS,
connectionLimit: 5,
bigIntAsNumber: true,
trace: true
});
let conn;
try {
conn = await pool.getConnection();
console.log("connected ! connection id is " + conn.threadId);
await conn.release(); //release to pool
} catch (err) {
console.log("not connected due to error: " + err);
}
LucasDavion, Leigh-M and mriffey1
Metadata
Metadata
Assignees
Labels
No labels