New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error retrieve connection from pool timeout #93
Comments
|
I'm definitely doing something wrong, because I got pooling to work with mysql2 |
|
Could you indicate configuration options and indicate if this occurs immediatly of after some time ? Connection timeout implementation completely differ from mysql2. It can occur when all connections from pool are used for example. sorry for delay ! |
|
@rusher I get same error sometime after execute 10-15 query. Here is my config Here is using |
|
@rusher As far as I remember, the errors wouldn't start on the first few executions, but a bit later while the code was running, Is this what you mean by the configuration? const pool = mariadb.createPool({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PWD,
database: process.env.DB_NAME,
connectionLimit: 5
})
async function getChannelData(ch_id) {
let conn, channel_name, network
try {
conn = await pool.getConnection()
const rows = await conn.query("SELECT name, network FROM channel_list WHERE channel_id = ?", [ch_id])
channel_name = rows[0].name
network = rows[0].network
} catch (err) {
throw err
} finally {
if (conn) conn.release()
}
} |
|
i have same error incounted. below code is mine if you still no clue of this issue.
and this is my error logs Thanks |
|
There is many things in that thread. After studying each line of the code, i failed to see how there can be a connection leak in pool implementation. To have more insight of this issue, a new pool option Could you test with this option set to have better information ? So either pool |
Thanks for reply. But oddly, i cannot create same error again. 🤔 Ill keep my eyes on Logger for catching same error from now. |
|
ok, closing this from now, then. |
|
@rusher it seems I'm having the same issue. I have my own thin connection pool abstraction (on top of mariadb's Pool class), which makes sure that no connection is used twice at the same time. After adding more integration tests I suddenly get this error message as well. After debugging I made sure that there is no dangling connection (by printing when someone acquires vs releases a connection). When I set shows 152, while my connection counter (which is increased when |
Hi there,
Not sure why I'm getting these two errors, when I'm basically using the example ECMAScript 2017 code provided.
The MariaDB server on web host instance and the NodeJS server IP is allowed to connect to the SQL DB.
and/or
The text was updated successfully, but these errors were encountered: