-
Notifications
You must be signed in to change notification settings - Fork 155
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
Unable to connect to mysql after upgrading to 2.3.3 #136
Comments
Hi rrosenblum, Sorry for the issues. We'll do some testing on our end to see what the issue is. I think it's a fair call that the mysql2 changes may have broken the mysql patch functionality. |
Hey, Thanks for the report. My apologies for any inconveniences. I didn't have too much time so far to look into it, but I was able to reproduce it. For now it should be alright to (temporarily) remove the parts that patch a Pool it's getConnection function. So far it looked like it's somewhere down that line that something was hitting a snag, maybe because the MySQL package internally uses getConnection on the Pool when using Pool.query. Unfortunately I couldn't yet figure out the full problem, but I'll try looking into it more as soon as I have the time. Suppose it might be interesting to see if this can be replicated with a test which stubs/simulates a Pool's query function. Let me know if I can be of any more help. |
After looking into it further, Pool.query creates a Query instance and a connection and then calls the connection.query function with only the Query instance as argument. This falls into this case, from further up in query: https://github.com/mysqljs/mysql/blob/99d6f78ba00f926de162dbef42865029b6e8ec39/lib/Connection.js#L26 It's currently going into this if statement:
Which then splits up the Query instance that was passed through and currently makes it so that a new one is created by calling Connection.query with its sql and values, thereby losing the original Query instances EventEmitter. |
Same problem with Temporary workaround, downgrade "dependencies": {
"aws-xray-sdk-core": "~2.3.3",
"aws-xray-sdk-mysql": "2.2.0"
} |
Closing since it was fixed in PR. |
After upgrading from version 2.2.0 to 2.3.3, I am unable to connect to mysql. I believe this is related to #98. There isn't much of an actual error being produced that I can see. The lambda just winds up timing out without ever actually connecting to mysql. I have tried increasing the timeout. I think this might be related to #98.
I have tried 2 different ways to capture mysql.
The text was updated successfully, but these errors were encountered: