-
Notifications
You must be signed in to change notification settings - Fork 821
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
[plugin-mysql]: MaxListenersExceedWarning: Memory Leak #878
Labels
bug
Something isn't working
Comments
looking into this |
Can you give me more info like what ORM you are using if any and what your connection setup and query code looks like? |
Thank you :). import mysql from 'mysql'
export const connection = mysql.createPool({
connectionLimit: process.env.MYSQL_CONNECTION_LIMIT,
host: process.env.MYSQL_HOST,
port: process.env.MYSQL_PORT,
user: process.env.MYSQL_USER,
password: process.env.MYSQL_PASSWORD,
database: process.env.MYSQL_DATABASE
})
export const query = async (query, preparedParams) => {
return new Promise((resolve, reject) => {
connection.query(query, preparedParams, (err, result) => {
if (err) return reject(err)
resolve(result)
})
})
} |
@BowlingX I think I have a fix just need reviews and I'll get it pushed asap |
Just published |
Works perfectly :) thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of OpenTelemetry are you using?
0.5.0, plugin-mysql (also present in 0.4.0)
What version of Node are you using?
12.13.1
What did you do?
I'm using the
plugin-mysql
with a mysql pool.After a short amount of requests with the plugin enabled, I get
Tracing the issue shows it comes from here:
https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-plugin-mysql/src/mysql.ts#L237
Without the plugin enabled, I don't have any issues.
The text was updated successfully, but these errors were encountered: