Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to force close a pooled connection? #1118

Unanswered
andy-yx-chen asked this question in Q&A
Discussion options

There is a case that reset connection for XA transactions may bring back a prepared XA transaction which is already rollback by repairer, I don't want all XA related connections are not pooled, but just to force close connections that are running into issues

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

The only way is to call MySqlConnection.ClearPool, which closes all pooled connections with the same connection string.

You must be logged in to vote
1 reply
Comment options

ClearPool does not work, I eventually figure out that I can do "KILL CONNECTION_ID()" to kill the current connection and turns out that this driver can handle the error from server for killing, thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /