Node-mysql2: Acquire timeout isn't implemented

Created on 9 Nov 2017  路  5Comments  路  Source: sidorares/node-mysql2

Are there any plans to implement acquireTimeout as a connection option (in keeping with mysqljs/mysql)?

Most helpful comment

Wanted to +1 this, but if i get some time i will try to pull that as its not moved

All 5 comments

pool is a bit behind from mysqljs/mysql. Because that part ( pool implementation ) was originally copy/pasted from there I don't want to diverge too much and prefer sync from time to time. Ideally in the future this should move in separate shared repo under mysqljs organisation

If you can help with this and pull recent pool code that would be really great ( and Ideally add unit tests for all new functionality )

Wanted to +1 this, but if i get some time i will try to pull that as its not moved

I want to migrate from mysql to mysql2. And now I got the following warning:

Ignoring invalid configuration option passed to Connection: acquireTimeout. This is currently a warning, but in future versions of MySQL2, an error will be thrown if you pass an invalid configuration options to a Connection

It would be nice to have this option supported. Without it I doubt how everything will work, since there is rather much code in my current project.

@RussCoder PRs are open :)
I have slightly higher other priorities for this module atm I want to finish first but really want to fix this mysqljs/mysql incompatibility too

We made a monkey patch to help with this, back in 2017, which we wanted to share. We don't have time to help the project converge with mysql, but your comment reminded us, so we spent some time making the patch generic. It's now published as @7digital/mysql2-timeout. It only has a limited set of features, but hopefully it can help anyone needing acquireTimeout or queryTimeout.

Was this page helpful?
0 / 5 - 0 ratings